Ask coding questions

← Back to all posts
How do u use MySQL?
h
RohilPatel (1581)

This isn't working, and I don't exactly know why. Please help. Thanks you!

Comments
hotnewtop
matjung (0)

The "repl.it" mysql drivers are working.
One needs to work with a MySQL Server that is hosted elsewhere and it needs to permit remote connections.

RohilPatel (1581)

Lol I asked this 12 months ago, not 12 hrs @matjung

LiamDonohue (294)

sadly, MySQL is not compatible with SQLite

LiamDonohue (294)

also, I have a question. what's not working. there is no project in this post @RohilPatel

Vandesm14 (2737)

I don't think mysql works on repl.it. Last time I checked, only sqlite3 works on repl.it

Coder100 (18208)

Line 21:

console.log("An error occured")

What good person would do this to themselves?

console.log("An error occured", error)

And you will see the error.
Or go to line 15 and fill it out.

RohilPatel (1581)

how is this not a connection. look at the error. @Coder100

Coder100 (18208)

Why would you not put in a password. @RohilPatel

Coder100 (18208)

well duh... if you think about it... what is the point of accounts? To identify who's database is who's duh @RohilPatel

Coder100 (18208)

A connection error means it has connected to the wrong initials I bet the URLs are based on your username and password or the connection refused because your username and password is incorrect *facepalm* @RohilPatel

Giothecoder (140)

I think it’s mssqul?

Edit: oops. msql. that.

RohilPatel (1581)

What? I'm confused now.... @Giothecoder

Giothecoder (140)

@RohilPatel require('msql); instead of mysql

Giothecoder (140)

@RohilPatel or do you mean you don’t know how to make a statement?

Giothecoder (140)

@RohilPatel oohhh. Wait but there’s probably stuff about that on the docs. Go look for msql on npm.org, and it should be there maybe?

RohilPatel (1581)

I have tried, but you need to install something, and that won't work with repl. @Giothecoder

Giothecoder (140)

@RohilPatel what do you mean install something? It might... it depends, ya?

RohilPatel (1581)

I think I need to install something to make this work. but idk how I can use it on repl. @Giothecoder

RohilPatel (1581)

I mean, I don't know how to get a database set up. @Giothecoder

RohilPatel (1581)

I was. answering ur comment before. @Giothecoder

Giothecoder (140)

@RohilPatel oh lol ok. Let’s see if we can figure this out.....

Giothecoder (140)

@RohilPatel ok so I think I found the thing your talking about. So. I suggest instead looking for a remote sql dB.

RohilPatel (1581)

do u have any references?
@Giothecoder

Giothecoder (140)

@RohilPatel maybe. If you look on repl.it I’m pretty sure they have some tutorials on how to make a remote sql dB, but for now I suggest looking up it