MySQL [ERROR] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL [ERROR] (
/showthread.php?tid=662729)
MySQL [ERROR] -
Heress - 09.01.2019
Hello, when i start server, i got errors in log
Quote:
[15:50:01] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'IP' (10061)'
[15:50:02] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'IP' (10061)'
[15:50:03] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'IP' (10061)'
[15:50:04] [ERROR] CConnection::CConnection - establishing connection to MySQL database failed: #2002 'Can't connect to MySQL server on 'IP' (10061)'
[15:50:04] [ERROR] cache_get_row_count: no active cache
|
Re: MySQL [ERROR] -
AhmedMohamed - 09.01.2019
Sure that you typed the right IP address and the right DB name?
Re: MySQL [ERROR] -
Heress - 09.01.2019
Quote:
Originally Posted by AhmedMohamed
Sure that you typed the right IP address and the right DB name?
|
Yes, because using
http://IP.IPP.IP.IP/phpmyadmin/ I Can connect to database.
Re: MySQL [ERROR] -
Chyakka - 09.01.2019
You're trying to connect to your database with the ip "IP", look for the part of your code where you define what you're connecting to and replace "IP" with localhost or whatever IP you're connecting to for your database connection.
Re: MySQL [ERROR] -
Heress - 09.01.2019
Quote:
Originally Posted by Chyakka
You're trying to connect to your database with the ip "IP", look for the part of your code where you define what you're connecting to and replace "IP" with localhost or whatever IP you're connecting to for your database connection.
|
MySQL is on VPS so localhost can't be
"ip" i hiden my IP adress, not real
Re: MySQL [ERROR] -
Chyakka - 09.01.2019
Quote:
Originally Posted by Heress
MySQL is on VPS so localhost can't be
|
Are you running your database and server from the VPS?
If you're using a service like XAMPP for the SQL server and your VPS is hosting both database and server, localhost should work as the VPS only needs to communicate with the server locally as they're ran on the same machine.
Re: MySQL [ERROR] -
Heress - 09.01.2019
Quote:
Originally Posted by Chyakka
Are you running your database and server from the VPS?
If you're using a service like XAMPP for the SQL server and your VPS is hosting both database and server, localhost should work as the VPS only needs to communicate with the server locally as they're ran on the same machine.
|
my mysql is installed with PuTTY
Re: MySQL [ERROR] -
Chyakka - 09.01.2019
Quote:
Originally Posted by Heress
my mysql is installed with PuTTY
|
Well if your server and database are ran on the same VPS localhost should work, otherwise you'll need to setup a SQL account and replace "IP" with the IP of the VPS running the database and changing the username and password to the one you've created.
Re: MySQL [ERROR] -
Heress - 09.01.2019
Quote:
Originally Posted by Chyakka
Well if your server and database are ran on the same VPS localhost should work, otherwise you'll need to setup a SQL account and replace "IP" with the IP of the VPS running the database and changing the username and password to the one you've created.
|
it tried, but same error
Re: MySQL [ERROR] -
SymonClash - 09.01.2019
Use your VPS ip to connect to the database.