If you are on BlueQuartz there are a couple of chances that you can 'find' the password provided you have 'root' access to the server through the console or SSH. Provided that you initially set the MySQL root password through the GUI, you can look up the password this way: cat /usr/sausalito/codb/objects/1/mysql.newpass If you set the password from the command line as root instead, chances are, that your input from back then is still stored in the .bash_history file of user root. So thry that: cat /root/.bash_history |grep mysql
For good measure also try the .bash_history file of user admin: cat ~admin/.bash_history |grep mysql Now if that didn't help, then let's do it the hard way: Stop MySQLd: /etc/init.d/mysqld stop Switch to user 'mysql': su mysql
Now re-start MySQL with the following parameters: /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --skip-grant-tables & Then run this commands: mysql -u root flush privileges; USE mysql; UPDATE user ->SET password=password("newpassword") ->WHERE user="root"; flush privileges;
Then press CTRL+D to exit out of the MySQL command line and again CTRL+D to switch back from user 'mysql' to user 'root*. Now restart MySQLd again: /etc/init.d/mysqld start Fixed. |