This is a discussion on Reset forgotten root password. within the MySQL Database forums, part of the Database Forums category; Dear MySQL Experts, I need to reset the mysql root password, but I forgot its current password. I am using ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Dear MySQL Experts,
I need to reset the mysql root password, but I forgot its current password. I am using Mysql 5.1: # mysql --version mysql Ver 14.12 Distrib 5.1.11-beta, for portbld-freebsd6.2 (i386) using 5.0 After stopped mysqld with command "killall mysqld", I executed the following commands tried to reset its password: # /usr/local/bin/mysqld_safe --skip-grant-tables --user=root & [1] 76792 # Starting mysqld daemon with databases from /var/db/mysql # mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.1.14-beta Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use mysql; ERROR 1049 (42000): Unknown database 'mysql' mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | +--------------------+ 1 row in set (0.01 sec) mysql> I don't know why mysql is not exist, or do I need it? If not, how to create or initialize mysql database? After quit from myql client, I tried to following mysqladmin command: # /usr/local/bin/mysqladmin -u mysql password kg2000 /usr/local/bin/mysqladmin: Can't turn off logging; error: 'Access denied; you need the SUPER privilege for this operation' In general, my attempt is failure with the above methods. Can anyone give me a guidline or helping hand to reset a forgotten mysql root password? Very apprecate for any suggestion. Thanks S |