SA-MP Forums Archive
Localhost requires password - 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: Localhost requires password (/showthread.php?tid=594629)



Localhost requires password - SecretBoss - 21.11.2015

Hello,

Today I tried to load a gamemode on my localhost, even after I edited configuration defines it keeps saying me this error

Код:
Access denied for user 'root'@'localhost' (using password: YES)
Configuration used

Код:
#define MYSQL_HOST					"localhost"
#define MYSQL_USER					"root"
#define MYSQL_PASS					""
#define MYSQL_DB					"samp"
Thanks for reading


Re: Localhost requires password - Bolex_ - 21.11.2015

Check again. It's clearly trying to log in with a password, be sure that the password
parameter is like this: "" and not like this: " ". Not sure if that matters, but it's clearly trying with a password.


Re: Localhost requires password - SecretBoss - 21.11.2015

Quote:
Originally Posted by Scripter18
Посмотреть сообщение
Check again. It's clearly trying to log in with a password, be sure that the password
parameter is like this: "" and not like this: " ". Not sure if that matters, but it's clearly trying with a password.
I have already posted the defines check them before posting please

Код:
#define MYSQL_PASS					""
Quote:
Originally Posted by Karan007
Посмотреть сообщение
Check where the MySQL database opens. Maybe you've wrote the password there?
I don't think so

Код:
mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB, mysqlconnection, 1);



Re: Localhost requires password - iKarim - 21.11.2015

Did you try to access database through Navicat MySQL? or even phpMyAdmin?
Also I suggest you to try make a simple password for your MySQL server and use it to access the database.
P.S.:I usually face problems while making a MySQL server without password.


Re: Localhost requires password - jlalt - 21.11.2015

open MySQL console and try to use this command:
Код:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
or remove the password:
Код:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');



Re: Localhost requires password - SecretBoss - 21.11.2015

Quote:
Originally Posted by jlalt
Посмотреть сообщение
open MySQL console and try to use this command:
Код:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
or remove the password:
Код:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');
Still not working (I tried both codes)