Ask coding questions

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

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

Voters
Tecnico-de-info
DexieTheSheep
charliekmcmahon
notamine1
gidionatty
DaemonBeast
CodyChoo
ChungusFam
RohilPatel
Comments
hotnewtop
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.

RohilPatel

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

HackermonDev

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

staticvoidliam7

sadly, MySQL is not compatible with SQLite

RohilPatel

Aight, @LiamDonohue

staticvoidliam7

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

Vandesm14

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

RohilPatel

Is that still a database? @Vandesm14

Vandesm14
RohilPatel
Coder100

Line 21:

What good person would do this to themselves?

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

RohilPatel

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

Coder100

Why would you not put in a password. @RohilPatel

RohilPatel

do I need to make one?
@Coder100

Coder100

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

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

RohilPatel

Im so confused 😐 @Coder100

Coder100

on what? @RohilPatel

RohilPatel

Everything. @Coder100

Giothecoder

I think it’s mssqul?

Edit: oops. msql. that.

RohilPatel

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

Giothecoder

@RohilPatel require('msql); instead of mysql

Giothecoder

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

RohilPatel

Im trying it. @Giothecoder

RohilPatel

Nope. More errors. @Giothecoder

RohilPatel

Idk how to connect it. @Giothecoder

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?

RohilPatel

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

Giothecoder

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

RohilPatel

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

Giothecoder

@RohilPatel what’s the thing?

RohilPatel

look up "install mysql"
@Giothecoder

RohilPatel

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

Giothecoder

@RohilPatel hm. Um.

RohilPatel
Giothecoder
RohilPatel

I was. answering ur comment before. @Giothecoder

Giothecoder

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

RohilPatel
Giothecoder

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

RohilPatel

do u have any references?
@Giothecoder

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

RohilPatel