| Reset forgotten root p***word. -
06-04-2007, 07:58 AM
Dear MySQL Experts,
I need to reset the mysql root p***word, but I forgot its current p***word.
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 p***word:
# /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 p***word 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 p***word?
Very apprecate for any suggestion.
Thanks
S |