Reset forgotten root password.

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-27-2007
pp
 
Posts: n/a
Default Reset forgotten root password.

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0