debian 升级后mysql,在Debian 3.0上重建mysql

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?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值