Access denied for user root@localhost

[expired user #3300]'s profile image [expired user #3300] posted 16 years ago in Creating a connection Permalink
I'm getting the error

Could not establish connection! Details:

SQL Error: Access denied for user 'root'@'localhost'

I've tried using a password, as well as not using one. I've used MySQL in the past, but I've uninstalled it, and I started fresh with HeidiSQL. Let me know if you need more info. Thanks.


Cody
ansgar's profile image ansgar posted 16 years ago Permalink
You uninstalled MySQL ? I guess you mean MySQL-Front?

The message "access denied" means you have to find the right password for root. A fresh MySQL server normally has an empty password set for this root user. If you changed that password yourself, noone else than you will be able to tell it.

Or, you can temporarily configure the server to ignore the authentication tables, so you can connect to it with empty user and password. You will have to add this to your my.ini file:
[mysqld]
skip-grant-tables=1


Don't forget to remove the entry from your my.ini afterwards because that's extremely insecure.
[expired user #3300]'s profile image [expired user #3300] posted 16 years ago Permalink
Okay, now i'm getting "SQL Error: Can't connect to MySQL server on 127.0.0.1 (10061)
ansgar's profile image ansgar posted 16 years ago Permalink
Most obviously your mysql server has been stopped in the meantime. Just restart it by doing a
net start mysql
or
c:\path\to\mysql\bin\mysqld.exe --standalone
on the commandline or whatever.
[expired user #3325]'s profile image [expired user #3325] posted 16 years ago Permalink

I'm getting the error

Could not establish connection! Details:

SQL Error: Access denied for user 'root'@'localhost'
Cody


I'm getting the same error message and I can't seem to find the file you need to put the codes in, where woudl they be locatd?
ansgar's profile image ansgar posted 16 years ago Permalink
Somewhere in your %PATH% environment or in the directory where you have installed MySQL. Try these:
C:\Windows
C:\
C:\Path\To\MySQL\
[expired user #3343]'s profile image [expired user #3343] posted 16 years ago Permalink
i got the same problem but i dont know what to do know because the user and password ive got from an program where i can create wow servers so i need some help plz help
:(
ansgar's profile image ansgar posted 16 years ago Permalink
Help on what exactly? Didn't the postings above help you somehow?
[expired user #3343]'s profile image [expired user #3343] posted 16 years ago Permalink
no they didnt its because im using the program manGOS to create an private server to wow and there, there is a text where it says user pass where it cant log in with those
ansgar's profile image ansgar posted 16 years ago Permalink
And what about the above posting with the skip-grant-tables stuff in your my.ini - did you try that?
[expired user #3343]'s profile image [expired user #3343] posted 16 years ago Permalink
yeah but the differents things i could do those wasnt in my directory do you know how i can get them in??
ansgar's profile image ansgar posted 16 years ago Permalink
Sorry I don't get what you mean. Guessing: you didn't find the my.ini file?
ansgar's profile image ansgar posted 16 years ago Permalink
This thread is getting a bit fruitless as there is no exact description of the problem ... However, here is one general tip for you:

Is the MySQL server installed on your local computer?
Yes: just follow the above posting about the my.ini . If you do not have a my.ini, just create one in C:\
No: Ask the administrator of the MySQL server to give you a new MySQL account
[expired user #4905]'s profile image [expired user #4905] posted 14 years ago Permalink
<LogonDatabase Hostname = "localhost"
Username = "root"
Password = "ascent"
Name = "logon"
Port = "3306"
Type = "1">

change your everything what standing there to that only where LogonDatabase is standing or it will not workhappydont say it doesnt work because on my pc works thx :D
[expired user #6922]'s profile image [expired user #6922] posted 11 years ago Permalink
I faced the same problem but after I started wampserver and initialized phpMyadmin then switched to heidiSQL the problem was solved.
kalvaro's profile image kalvaro posted 11 years ago Permalink
This is a three year old thread. phpMyadmin is just a MySQL web client, it's by no means required to log into MySQL Server.
[expired user #6922]'s profile image [expired user #6922] posted 11 years ago Permalink
so could you explain what happened that fixed my problem because I can assure you that I did nothing different.
kalvaro's profile image kalvaro posted 11 years ago Permalink
No, I cannot explain what fixed your problem because I know nothing about it. But I can speculate that you had unflushed privilege changes and when you restarted Wampserver you inadvertently forced MySQL to apply them.

Whatever, sending someone who googles here to the unnecessary burden of downloading, installing and configuring PhpMyAdmin (when he might not even have a local web server to install it on) is a misleading advice, even it it worked for you.
[expired user #6922]'s profile image [expired user #6922] posted 11 years ago Permalink
Well thank you and I'll let you know if I find an answer.
[expired user #10329]'s profile image [expired user #10329] posted 7 years ago Permalink

I have a problem in logging in my university students online services I'm getting an error server Help me please

[expired user #10364]'s profile image [expired user #10364] posted 7 years ago Permalink

No, I cannot explain what fixed your problem because I know nothing about it. But I can speculate that you had unflushed privilege changes and when you restarted Wampserver you inadvertently forced MySQL to apply them.

Whatever, sending someone who googles here to the unnecessary burden of downloading, installing and configuring PhpMyAdmin (when he might not even have a local web server to install it on) is a misleading advice, even it it worked for you.

Agreed with you. When i started to learn php, mysql I faced similar kind problem. After completing the code it now work. Then i make lots of change and suddenly start to work. Even sometime i do not understand where was the problem. Although, most of the time i got it. But, really, strange experience.

sayyadimran's profile image sayyadimran posted 3 years ago Permalink

This is probably due to your server is refusing connection to client for security reason. You have to allow remote mySQl fromcPanel of your hosting.

Please login to leave a reply, or register at first.