Cannot login to mysql after running privileges scripts

Asked by cmfchong

After installing mysql, I login with root user and no password.
After I run a privileges script I cannot login to mysql anymore!!
It gives an error message saying "Access denied for user root@localhost ... "
Pls help.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
thecajun (bill-bruns) said :
#1

Is it perhaps that the "privileges script" is changing the privileges or the password for user "root"?

Revision history for this message
cmfchong (cmfchong) said :
#2

Yes, must be otherwise why can't i login using root ID.
Before the script, i can login using ID root with no password.
How can i find out the new password of root, or how to revert back the run script?
Any advice ?

Revision history for this message
mrog (michael-studiomeister) said :
#3

The script should have the password in it.

Otherwise, follow this:

http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html

Revision history for this message
Gopinath (vgopinat) said :
#4

As suggested in this forum, I tried root@ubuntu:~# mysqld_safe --skip-grant-tables -u root &
but still got the following error:
root@ubuntu710desktop:~# root@ubuntu:~# mysqld_safe --skip-grant-tables -u root &
[1] 14188
root@ubuntu710desktop:~# -bash: root@ubuntu:~#: command not found

[1]+ Exit 127 root@ubuntu:~# mysqld_safe --skip-grant-tables -u root

Need help. thanks.

Can you help with this problem?

Provide an answer of your own, or ask cmfchong for more information if necessary.

To post a message you must log in.