Results 1 to 2 of 2
My old post seems to have been deleted... dunno why..
Well I found the following on google telling you how to reset it
18.9 How to reset a forgotten password. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-18-2003 #1Just Joined!
- Join Date
- Jul 2003
- Location
- TEXAS
- Posts
- 19
MYSQL root password forgotton
My old post seems to have been deleted... dunno why..
Well I found the following on google telling you how to reset it
18.9 How to reset a forgotten password. If you have forgotten the root user password for MySQL, you can restore it with the following procedure. Take down the mysqld server by sending a kill (not kill -9) to the mysqld server. The pid is stored in a .pid file which is normally in the MySQL database directory: kill `cat /mysql-data-directory/hostname.pid` You must be either the UNIX root user or the same user the server runs as to do this. Restart mysqld with the --skip-grant-tables option. Connect to the mysqld server with mysql -h hostname mysql and change the password with a GRANT command. See section 7.26 GRANT and REVOKE syntax. You can also do this with mysqladmin -h hostname -u user password 'new password' Load the privilege tables with: mysqladmin -h hostname flush-privileges or with the SQL command FLUSH PRIVILEGES.
So... I took down the sqld
But then I couldn't find a way to restart it with --skip-grant-tables ..... I looked at the --help for mysql and mysqladmin ... nothing like that caught my eye
NOW...
Once I get all the above figured out thus far...
when I connect to the mysql with
"mysql -h hostname"
Since my box often says stuff like localhost.localdomain will I do a mysql -h localhost.localdomain
or do
mysql -h mydomain.org........?
(i'm guessing localhost.localdomain)
then that's when I type GRANT <my desired new pass> ?
thanks for clearing my confusion... I feel like a real idiot... and I'm embarassed...
- 07-18-2003 #2Linux Engineer
- Join Date
- Jan 2003
- Location
- Lebanon, pa
- Posts
- 994
Run this command:
mysql_install_db
It will rewrite your permission tables.


Reply With Quote
