Jonny J wrote:
>
> I have to agree with Tom (tom_AT_kvintus.dk), i´m in the same
> situation and i have tried the password from .my.cnf and the
> password from (etc/openldap/ldap.pw) and the result is the
> same every time:
>
> ******
> MySQL Connection Failed: Access denied for user:
> 'root@localhost' (Using password: YES)
> ******
>
> So my question is, are there anyone who has solved the
> problem them selves ?? in that case i would like to hear from
> you.
You shouldn't need to enter the password, assuming your trying this from root's account. mysql will stat the .my.cnf file in your home dir and use the password defined in there.
But if you believe the passwords somehow differ and need to reset the password, you can always just skip the grants table on startup of mysql and drop in a new password, you should use the one in the .my.cnf file.
eg.
[root@sak /root]# service mysqld stop
Stopping MySQL: [ OK ]
[root@sak /root]# /usr/libexec/mysqld --user=mysql --skip-grant-tables >/dev/null &
[root@sak /root]# mysql -u root mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.36
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql> update user set password=password('password from /root/.my.cnf') where user='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@sak /root]# ps -efa | grep mysql | head -1
mysql 7143 6918 0 04:31 pts/1 00:00:00 /usr/libexec/mysqld --user=mysql
[root@sak /root]# kill -9 7143
[1]+ Killed /usr/libexec/mysqld --user=mysql --skip-grant-tables
[root@sak /root]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.36
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
--
Damien