SA-MP Forums Archive
Can't connect to mysql server - 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: Can't connect to mysql server (/showthread.php?tid=539752)



Can't connect to mysql server - PabloAguado - 30.09.2014

Well i have searched for a solution on ****** but didn't find any so i decided to post it here so basically i am trying to do this with phpmyadmin but when i open the server it says Access Denied when i never placed a password inside of it

pawn Код:
#define MYSQL_HOST  "localhost"
#define MYSQL_USER  "root"
#define MYSQL_DB    "LARPDB"
#define MYSQL_PASS  ""
Log

Код:
[23:31:17] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'root'@'localhost' (using password: YES)
[23:33:25] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "larpdb", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:33:25] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:33:25] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:33:25] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:33:25] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:33:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:33:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:33:25] [DEBUG] mysql_errno - connection: 0
[23:33:25] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:33:25] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:33:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:33:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:33:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:33:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:34:10] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "LARPDB", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:34:10] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:34:10] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:34:10] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:34:10] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:34:10] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:34:10] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:34:10] [DEBUG] mysql_errno - connection: 0
[23:34:10] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:34:10] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:34:10] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:34:10] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:34:10] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:34:10] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:34:10] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "LARPDB", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:42:02] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:42:02] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:42:02] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:42:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] mysql_errno - connection: 0
[23:42:02] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:42:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "LARPDB", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:42:22] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:42:22] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:42:22] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:42:22] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:22] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] mysql_errno - connection: 0
[23:42:22] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:42:22] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:22] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:22] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:22] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled



Re: Can't connect to mysql server - JordanDoughty - 30.09.2014

Quote:
Originally Posted by PabloAguado
Посмотреть сообщение
Well i have searched for a solution on ****** but didn't find any so i decided to post it here so basically i am trying to do this with phpmyadmin but when i open the server it says Access Denied when i never placed a password inside of it

pawn Код:
#define MYSQL_HOST  "localhost"
#define MYSQL_USER  "root"
#define MYSQL_DB    "LARPDB"
#define MYSQL_PASS  ""
Log

Код:
[23:31:17] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'root'@'localhost' (using password: YES)
[23:33:25] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "larpdb", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:33:25] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:33:25] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:33:25] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:33:25] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:33:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:33:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:33:25] [DEBUG] mysql_errno - connection: 0
[23:33:25] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:33:25] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:33:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:33:25] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:33:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:33:25] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:34:10] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "LARPDB", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:34:10] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:34:10] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:34:10] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:34:10] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:34:10] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:34:10] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:34:10] [DEBUG] mysql_errno - connection: 0
[23:34:10] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:34:10] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:34:10] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:34:10] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:34:10] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:34:10] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:34:10] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "LARPDB", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:42:02] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:42:02] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:42:02] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:42:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] mysql_errno - connection: 0
[23:42:02] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:42:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:02] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "LARPDB", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[23:42:22] [DEBUG] CMySQLHandle::Create - creating new connection..
[23:42:22] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[23:42:22] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[23:42:22] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:22] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] mysql_errno - connection: 0
[23:42:22] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[23:42:22] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:22] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[23:42:22] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:22] [DEBUG] CMySQLConnection::Connect - connection was successful
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[23:42:22] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
Make sure you've allowed it to use a password in your settings for mysql.


Re: Can't connect to mysql server - PabloAguado - 30.09.2014

How do i do that? it's my first time using mysql


Re: Can't connect to mysql server - PabloAguado - 30.09.2014

Can i get some help please?


Re: Can't connect to mysql server - PabloAguado - 01.10.2014

Can i please have some assistance with my current problem?


Re: Can't connect to mysql server - PabloAguado - 02.10.2014

Bump, please help me guys i don't understand the problem i am experiencing


Re: Can't connect to mysql server - VishvaJeet - 02.10.2014

Quote:

CMySQLConnection::Connect - (error #1045) Access denied for user 'root'@'localhost' (using password: YES)

are you sure you are using correct username & password ?


Re: Can't connect to mysql server - PabloAguado - 02.10.2014

Yes they are default username and password for phpmyadmin i don't know why it doesn't work


Re: Can't connect to mysql server - Ox1gEN - 02.10.2014

Same motherfucking problem I had, check this thread, IceCube! helped me with that plus alot of googling and shit.

thread: https://sampforum.blast.hk/showthread.php?tid=534077

scoop through that thread, I guarantee you are going to find at least one answer.


Re: Can't connect to mysql server - PabloAguado - 04.10.2014

I have read all what he stated and tried every way i somewhat fixed the 1045 error but it still says in the log that it fails to connect but the connection is successful only the myslq_errno states the problem

Код:
[17:23:56] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "LARPDB", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[17:23:56] [DEBUG] CMySQLHandle::Create - creating new connection..
[17:23:56] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[17:23:56] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[17:23:56] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[17:23:56] [DEBUG] CMySQLConnection::Connect - connection was successful
[17:23:56] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[17:23:56] [DEBUG] mysql_errno - connection: 0
[17:23:56] [ERROR] "mysql_errno" - invalid connection handle (id: 0)
[17:23:56] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[17:23:56] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[17:23:56] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[17:23:56] [DEBUG] CMySQLConnection::Connect - connection was successful
[17:23:56] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[17:23:56] [DEBUG] CMySQLConnection::Connect - connection was successful
[17:23:56] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
Can you please explain how to fix this since i have followed all the steps