MySQL Doesn't connect? -
Ritzy2K - 06.07.2016
Any idea the fuck is this?
Код:
Access denied for user 'root'@'localhost' (using password: YES).
I'm sure im using the correct pass in mysql_connect. But this seems to come up everytime.
Re: MySQL Doesn't connect? -
Luicy. - 06.07.2016
Are you using XAMPP?
If so, try leaving the password empty.
Also, Show us the line of the config/connect. You can take out the pass.
Re: MySQL Doesn't connect? -
Ritzy2K - 06.07.2016
Yes, I'm using XAMPP, Before when i was leaving the pass empty, it had the same issue, So i tried to gave pass and thought this would help.
Here is my mysql_connect.
mysql_connect("localhost", "root", "password", "database", connection, 1);
Re: MySQL Doesn't connect? -
Luicy. - 06.07.2016
Quote:
Originally Posted by [ND]xXZeusXx.
Yes, I'm using XAMPP, Before when i was leaving the pass empty, it had the same issue, So i tried to gave pass and thought this would help.
Here is my mysql_connect.
mysql_connect("localhost", "root", "password", "database", connection, 1);
|
PHP код:
mysql_connect("localhost", "root", "database", "password");
or if connection is a int for the handle:
PHP код:
connection = mysql_connect("localhost", "root", "database", "password");
Re: MySQL Doesn't connect? -
Ritzy2K - 06.07.2016
No, same error :/
But but, This might be of any help, I'm NOT using the default apache port 80, but 8080. (cause skype).
Re: MySQL Doesn't connect? -
Luicy. - 06.07.2016
Quote:
Originally Posted by [ND]xXZeusXx.
No, same error :/
But but, This might be of any help, I'm NOT using the default apache port 80, but 8080. (cause skype).
|
That's not causing it, apache are webserver, nothing to do with MySQL.
Are you sure that you got the correct password and database?
And, where are you calling this?
Re: MySQL Doesn't connect? -
Ritzy2K - 06.07.2016
Yes, absolutely correct password and database, I'm calling it under OnGameModeInit?
Re: MySQL Doesn't connect? -
yutaruta - 06.07.2016
if you are running the server under linux run the samp server with command "sudo"...
if not try running the server as administrator.
Re: MySQL Doesn't connect? -
Ritzy2K - 06.07.2016
https://sampwiki.blast.hk/wiki/MySQL_Plugin#mysql_init
Here, it says in mysql_connect that my syntax was correct. I don't know, Now i am confused.
EDIT: I'm home hosting it for testing, so windows.
Re: MySQL Doesn't connect? -
Luicy. - 06.07.2016
Quote:
Originally Posted by [ND]xXZeusXx.
|
https://sampwiki.blast.hk/wiki/MySQL#mysql_connect