Hi all,
I have run into a bit of a problem. I recently setup mysql to run on a
Debian Linux box I setup. I am by no means an expert on either linux or
mysql. I know enough to just be dangerous. =)
I had it set up so I could read and write to the database through my perl
code, connect with phpmyadmin, etc. Not one to be happy I attempted to set
up a pop3 mailserver .. well .. not to successful there so I abandoned that
idea. Then to my horror I discover that everything in mysql database is gone
... the few tables I created, the users, the databases.
When I try to view databases all I get is this:
mysql> SHOW DATABASES;
Empty set (0.00 sec)
I tried using:
mysql_fix_privilege_tables
but got: ERROR 1044: Access denied for user: ''@localhost'' to database
''mysql''
I killed of mysqld and restarted with --skip-grant-tables option then
setting the new password with
mysqladmin -u root password ''RogerTheRabbit''
command
It threw this error:mysqladmin: unable to change password; error: ''You must
have privileges to update tables in the mysql database to be able to change
passwords for others''
I am just grasping at straws here .. other then a complete reinstall of
linux does anyone know a good way to recover mysql to a useable point? The
data I had in there isn''t that important .. I just want to be able to read
and write to it again.
Any help would be most appreciated.
解决方案
KnockKnock wrote:
I killed of mysqld and restarted with --skip-grant-tables option then
setting the new password with
mysqladmin -u root password ''RogerTheRabbit''
command
It threw this error:mysqladmin: unable to change password; error: ''You must
have privileges to update tables in the mysql database to be able to change
passwords for others''
I am just grasping at straws here .. other then a complete reinstall of
linux does anyone know a good way to recover mysql to a useable point? The
data I had in there isn''t that important .. I just want to be able to read
and write to it again.
Any help would be most appreciated.
What ever you do, don''t reinstall Linux. I''m sure that you don''t have to
go that far at this point. ;)
Have you tried the alternative aproach from this site:
http://www.mysql.com/doc/en/Resetting_permissions.html
KnockKnock wrote:
I killed of mysqld and restarted with --skip-grant-tables option then
setting the new password with
mysqladmin -u root password ''RogerTheRabbit''
command
It threw this error:mysqladmin: unable to change password; error: ''You must
have privileges to update tables in the mysql database to be able to change
passwords for others''
I am just grasping at straws here .. other then a complete reinstall of
linux does anyone know a good way to recover mysql to a useable point? The
data I had in there isn''t that important .. I just want to be able to read
and write to it again.
Any help would be most appreciated.
What ever you do, don''t reinstall Linux. I''m sure that you don''t have to
go that far at this point. ;)
Have you tried the alternative aproach from this site:
http://www.mysql.com/doc/en/Resetting_permissions.html
"Aggro" wrote in message
news:vz*************@read3.inet.fi...KnockKnock wrote:
I killed of mysqld and restarted with --skip-grant-tables option then
setting the new password with
mysqladmin -u root password ''RogerTheRabbit''
command
It threw this error:mysqladmin: unable to change password; error: ''You
must have privileges to update tables in the mysql database to be able to
change passwords for others''
I am just grasping at straws here .. other then a complete reinstall of
linux does anyone know a good way to recover mysql to a useable point?
The data I had in there isn''t that important .. I just want to be able to
read and write to it again.
Any help would be most appreciated.
What ever you do, don''t reinstall Linux. I''m sure that you don''t have to
go that far at this point. ;)
Have you tried the alternative aproach from this site:
http://www.mysql.com/doc/en/Resetting_permissions.html
I tried this approach and got as far as:
mysqladmin -u root password ''NewPassword''
only to get:
mysqladmin: unable to change password; error: ''You must have privileges to
update tables in the mysql database to be able to change passwords for
others''
I am logged into my box as root ... not sure where to go from here. What is
the default user for mysql? Maybe that is how I should be logged in?