Skip to content
← Back to Community
How do u use MySQL?
Profile icon
RohilPatel

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

Voters
Profile icon
adiprastyo
Profile icon
gabgabmartin
Profile icon
Tecnico-de-info
Profile icon
DexieTheSheep
Profile icon
charliekmcmahon
Profile icon
notamine1
Profile icon
Gidion28
Profile icon
DaemonBeast
Profile icon
CodyChoo
Profile icon
ChungusFam
Comments
hotnewtop
Profile icon
matjung

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.

Profile icon
RohilPatel

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

Profile icon
HackermonDev

I made a tutorial to learn about this in learn https://repl.it/talk/learn/Create-Account-Database-MySQL-nodejs/20263

Profile icon
staticvoidliam7

sadly, MySQL is not compatible with SQLite

Profile icon
RohilPatel
Profile icon
staticvoidliam7

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

Profile icon
Vandesm14

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

Profile icon
RohilPatel

Is that still a database? @Vandesm14

Profile icon
Vandesm14
Profile icon
RohilPatel
Profile icon
Coder100

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.

Profile icon
RohilPatel

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

Profile icon
Coder100

Why would you not put in a password. @RohilPatel

Profile icon
RohilPatel

do I need to make one?
@Coder100

Profile icon
Coder100

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

Profile icon
Coder100

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

Profile icon
RohilPatel

Im so confused 😐 @Coder100

Profile icon
Coder100

on what? @RohilPatel

Profile icon
RohilPatel

Everything. @Coder100

Profile icon
Giothecoder

I think it’s mssqul?

Edit: oops. msql. that.

Profile icon
RohilPatel

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

Profile icon
Giothecoder

@RohilPatel require('msql); instead of mysql

Profile icon
Giothecoder

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

Profile icon
RohilPatel

Im trying it. @Giothecoder

Profile icon
RohilPatel

Nope. More errors. @Giothecoder

Profile icon
RohilPatel

Idk how to connect it. @Giothecoder

Profile icon
Giothecoder

@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?

Profile icon
RohilPatel

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

Profile icon
Giothecoder

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

Profile icon
RohilPatel

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

Profile icon
Giothecoder

@RohilPatel what’s the thing?

Profile icon
RohilPatel

look up "install mysql"
@Giothecoder

Profile icon
RohilPatel

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

Profile icon
Giothecoder

@RohilPatel hm. Um.

Profile icon
RohilPatel
Profile icon
Giothecoder
Profile icon
RohilPatel

I was. answering ur comment before. @Giothecoder

Profile icon
Giothecoder

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

Profile icon
RohilPatel
Profile icon
Giothecoder

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

Profile icon
RohilPatel

do u have any references?
@Giothecoder

Profile icon
Giothecoder

@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

Profile icon
RohilPatel