MySQL Doesn't connect?
#1

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.
Reply
#2

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.
Reply
#3

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);
Reply
#4

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"); 
Reply
#5

No, same error :/

But but, This might be of any help, I'm NOT using the default apache port 80, but 8080. (cause skype).
Reply
#6

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?
Reply
#7

Yes, absolutely correct password and database, I'm calling it under OnGameModeInit?
Reply
#8

if you are running the server under linux run the samp server with command "sudo"...
if not try running the server as administrator.
Reply
#9

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.
Reply
#10

Quote:
Originally Posted by [ND]xXZeusXx.
Посмотреть сообщение
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.
https://sampwiki.blast.hk/wiki/MySQL#mysql_connect
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)