brouznouf / fivem-mysql-async

MySql Async Library for FiveM
MIT License
111 stars 106 forks source link

Can't connect to remote DataBase #38

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi i'm currently using the latest version on Windows.

I'm trying to connect to this database but I can't. I'm 100% sure about the password and username because I can connect manualy, so I guess I used the connection string wrong

set mysql_connection_string "mysql://USER:PASSWORD@164.132.203.113/TABLE?dateStrings=true" Gives the following :

Access denied for user 'USER'@'MYIP' (using password yes)

geekwithbadge commented 6 years ago

I second this issue. I had to go back to the last version.

ghost commented 6 years ago

I cannot replicate (using MariaDB 10.3). I set up a remote database on a different pc in my local network. By the following usual steps:

And it worked. No issues at all.

Instead of the origin ip you can use % to allow any ip.

vecchiotom commented 6 years ago

🤔

TayHD commented 6 years ago

I also have this issue as well.

ghost commented 6 years ago

Thank you for telling me how to reproduce this issue so I can fix it. Instead of telling me there is an issue.

Because I do not have that issue. I tried to reproduce it and I failed.

You can try the insecureAuth option, which I would not recommend, and instead setting up your database properly.

Motorloid01 commented 6 years ago

This is not an issue with your code this is an issue with MySQL, So a lot of people use xampp for a MySQL database and that what I planed to use. I had tried it stand alone so straight a MySQL server and it worked fine as wine. So I started thinking why is it giving this error, I look and fivem wanted to use hostnames instead of an IP. So I looked for a way to resolve this issue and Like it was stated in this repo before me I put my bind address as 0.0.0.0 so it wouldn't just look for one, when I the ip of the computer it broke it even more. Now that the bind address is 0.0.0.0 and I'm using xampp It works fine for me.

This is my connection string

set mysql_connection_string "server=[ip];uid=[Username];password=[ip];port=3306;database=[database name]"

ghost commented 6 years ago

So a lot of people use xampp for a MySQL database.

Really why? Not like MariaDB packs heidisql (optional for years now) and has the bind to 0.0.0.0 by default. Why do people install big black boxes with potentially more security flaws than an installation by hand? Which even contains additional packages that are not even needed.

Thanks. Good to know should teach people not relying on xampp.

Motorloid01 commented 6 years ago

@GHMatti It is apparently what most collages are using, one because it has a web server, a MySQL server, FTP server, mail server, and tomcat what ever it is I use four out of the five. You can use heidisql to connect to MySQL through xampp.

ghost commented 6 years ago

No reproduction found. Closed.