SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 09/01/2019, 01:36 PM   #1
Heress
Huge Clucker
 
Heress's Avatar
 
Join Date: Mar 2018
Location: Lithuania
Posts: 262
Reputation: 7
Question MySQL [ERROR]

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
__________________
==============
Sorry for my bad English









Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 09/01/2019, 01:54 PM   #2
AhmedMohamed
Huge Clucker
 
AhmedMohamed's Avatar
 
Join Date: Jan 2014
Location: Egypt
Posts: 337
Reputation: 3
Default Re: MySQL [ERROR]

Sure that you typed the right IP address and the right DB name?
AhmedMohamed is offline   Reply With Quote
Old 09/01/2019, 02:05 PM   #3
Heress
Huge Clucker
 
Heress's Avatar
 
Join Date: Mar 2018
Location: Lithuania
Posts: 262
Reputation: 7
Default Re: MySQL [ERROR]

Quote:
Originally Posted by AhmedMohamed View Post
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.
__________________
==============
Sorry for my bad English









Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 09/01/2019, 02:05 PM   #4
Chyakka
Big Clucker
 
Join Date: Jul 2015
Location: England
Posts: 61
Reputation: 10
Default Re: MySQL [ERROR]

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.
Chyakka is offline   Reply With Quote
Old 09/01/2019, 02:07 PM   #5
Heress
Huge Clucker
 
Heress's Avatar
 
Join Date: Mar 2018
Location: Lithuania
Posts: 262
Reputation: 7
Default Re: MySQL [ERROR]

Quote:
Originally Posted by Chyakka View Post
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
__________________
==============
Sorry for my bad English









Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 09/01/2019, 02:09 PM   #6
Chyakka
Big Clucker
 
Join Date: Jul 2015
Location: England
Posts: 61
Reputation: 10
Default Re: MySQL [ERROR]

Quote:
Originally Posted by Heress View Post
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.
Chyakka is offline   Reply With Quote
Old 09/01/2019, 02:11 PM   #7
Heress
Huge Clucker
 
Heress's Avatar
 
Join Date: Mar 2018
Location: Lithuania
Posts: 262
Reputation: 7
Default Re: MySQL [ERROR]

Quote:
Originally Posted by Chyakka View Post
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
__________________
==============
Sorry for my bad English









Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 09/01/2019, 02:14 PM   #8
Chyakka
Big Clucker
 
Join Date: Jul 2015
Location: England
Posts: 61
Reputation: 10
Default Re: MySQL [ERROR]

Quote:
Originally Posted by Heress View Post
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.
Chyakka is offline   Reply With Quote
Old 09/01/2019, 02:16 PM   #9
Heress
Huge Clucker
 
Heress's Avatar
 
Join Date: Mar 2018
Location: Lithuania
Posts: 262
Reputation: 7
Default Re: MySQL [ERROR]

Quote:
Originally Posted by Chyakka View Post
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
__________________
==============
Sorry for my bad English









Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 09/01/2019, 02:28 PM   #10
SymonClash
Banned
 
Join Date: Dec 2018
Posts: 254
Reputation: 25
Default Re: MySQL [ERROR]

Use your VPS ip to connect to the database.
SymonClash is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL] Error (0): Failed to exeute query. You have an error in your SQL syntax; check the manual that corresponds to you lulo356 Scripting Help 3 24/07/2015 05:58 AM
(error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for t SandKing94 Scripting Help 3 22/05/2015 08:53 AM
[MYSQL ERROR ] Access denied for user 'your username here'@'localhost' (using password: YES) (error ID: 1045). SpikY_ Scripting Help 3 07/11/2014 04:09 PM
MySQL Plugin r39-2 Error: Can't connect to local MySQL server through socket Emre__ Scripting Help 10 30/07/2014 08:26 AM
Mysql queriesYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th audriuxxx Scripting Help 4 11/04/2014 06:42 PM


All times are GMT. The time now is 12:54 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.