在Debian 3.0上重建mysql [英] Rebuilding of mysql on Debian 3.0

查看:45
本文介绍了在Debian 3.0上重建mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我遇到了一些问题。我最近设置mysql运行在我设置的
Debian Linux机器上。我绝不是linux或

mysql的专家。我知道这很危险。 =)


我设置好了所以我可以通过我的perl

代码读取和写入数据库,连接phpmyadmin等等。我很高兴我试图在pop3邮件服务器上设置

..好吧..不要在那里成功所以我放弃了这个想法。然后我惊恐地发现mysql数据库中的所有内容都消失了

...我创建的几个表,用户,数据库。


当我尝试查看我得到的数据库是这样的:


mysql>显示数据库;

空集(0.00秒)


我尝试使用:

mysql_fix_privilege_tables


但得到:ERROR 1044:拒绝用户访问:''@ localhost''到数据库

''mysql''


我杀了mysqld并重新启动--skip-grant-tables选项然后

设置新密码

mysqladmin -u root密码''RogerTheRabbit''

命令

它抛出了这个错误:mysqladmin:无法更改密码;错误:''你必须

有权更新mysql数据库中的表才能更改

其他人的密码'


我只是抓住稻草在这里..然后完全重新安装

linux有没有人知道将mysql恢复到可用点的好方法?我在那里获得的
数据并不重要......我只是想能够阅读

并再次写信给它。


任何帮助都会非常感激。

解决方案

KnockKnock写道:

I杀死mysqld并重新启动--skip-grant-tables选项然后用
设置新密码mysqladmin -u root password''RogerTheRabbit''
命令
它扔了这个错误:mysqladmin:无法更改密码;错误:''您必须拥有更新mysql数据库中表的权限才能更改其他人的密码'

我只是在这里抓住稻草。其他然后完全重新安装
linux有没有人知道将mysql恢复到可用点的好方法?我在那里的数据并不重要......我只是希望能够阅读
并再次写信给它。
任何帮助都会非常感激。



无论你做什么,都不要重新安装Linux。我相信你现在没有必要这么做了。 ;)


您是否尝试过本网站的替代方法:

http://www.mysql.com/doc/en/Resetting_permissions.html


KnockKnock写道:

我杀了mysqld并重新启动--skip-grant-tables选项然后
设置新密码
mysqladmin -u root密码''RogerTheRabbit''
命令它抛出了这个错误:mysqladmin:无法更改密码;错误:''您必须拥有更新mysql数据库中表的权限才能更改其他人的密码'

我只是在这里抓住稻草。其他然后完全重新安装
linux有没有人知道将mysql恢复到可用点的好方法?我在那里的数据并不重要......我只是希望能够阅读
并再次写信给它。
任何帮助都会非常感激。



无论你做什么,都不要重新安装Linux。我相信你现在没有必要这么做了。 ;)


您是否尝试过本网站的替代方法:

http://www.mysql.com/doc/en/Resetting_permissions.html




" Aggro" < SP ********** @ yahoo.com>在消息中写道

news:vz ************* @ read3.inet.fi ...

KnockKnock写道:

我杀死了mysqld并重新启动了--skip-grant-tables选项然后
使用
设置新密码mysqladmin -u root password''RogerTheRabbit''
命令
它抛出了这个错误:mysqladmin:无法更改密码;错误:''你
必须有权更新mysql数据库中的表才能
更改其他人的密码''

我只是抓住稻草在这里..其他然后完全重新安装
linux有没有人知道将mysql恢复到可用点的好方法?
我在那里的数据并不重要..我只想再次读取和写入

任何帮助都会非常感激。


你做什么,不要重新安装Linux。我相信你不必在这一点上走得那么远。 ;)

你有没有尝试过这个站点的替代方法:

http://www.mysql.com/doc/en/Resetting_permissions.html



我试过这种方法到目前为止:

mysqladmin -u root密码''NewPassword''


只能得到:


mysqladmin:无法更改密码;错误:''您必须拥有权限才能在mysql数据库中更新表
才能更改密码

其他人''


我以root身份登录我的盒子...不知道从哪里开始。什么是

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" <sp**********@yahoo.com> 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?


这篇关于在Debian 3.0上重建mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆