Mysql Root Password - Just wont Reset!

Support for webhosts that use CentOS
Post Reply
willyk
Posts: 2
Joined: 2006/06/27 12:40:11
Contact:

Mysql Root Password - Just wont Reset!

Post by willyk » 2006/06/27 13:23:05

Hi All,

This is my forst time using centOS so bare with me.

The company i got my dedicated server from done the centOS installation for me then handed it over.

I tried to access mysql from shell and i am getting a access denied error.

I have now for 3 days been up and down th internet reading forums and trying different reset password advice.

All seem pretty similar and i have followed step by step.

This was my process

[root@localhost]#killall mysqld
[root@localhost]#/usr/libexec/mysqld --skip-grant-tables --user=root &

[root@localhost]# mysql

mysql> USE mysql

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> UPDATE user SET password=password("newpassword") WHERE user="root";

Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> exit;
[root@localhost]#killall mysqld

Then i restarted mysqld

[root@localhost]# /etc/init.d/mysqld start

By rights this should let me into mysql with my "new password" but when i put in

[root@localhost]# mysql -u root -p
enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


This is really frustrating i have spent 2 days trying to work it out. I refuse to post in forums until im sure i am beaten.

So any help would be appreciated


:-?

arrfab
Site Admin
Posts: 875
Joined: 2005/01/03 21:30:54
Location: /country/belgium
Contact:

Mysql Root Password - Just wont Reset!

Post by arrfab » 2006/07/08 12:34:18

Have you already tried this ? http://www.cognitive-dissonance.org/wiki/index.php?page=mysql

Post Reply

Return to “CentOS 4 - Webhosting Support”