Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
yongyi
帖子: 3025 注册时间: 2005-05-07 23:57
联系:
#1
帖子
由 yongyi » 2005-07-29 18:55
RT,关机和开机都会嘟一声。相信是mysql相关程序报的,滚动得太快,看不清楚。
我看了一下mysql的日志,有如下的:
/usr/sbin/mysqld, Version: 4.0.23_Debian-3ubuntu2-log, started with:
Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock
Time Id Command Argument
050729 18:43:09 1 Connect Access denied for user: 'debian-sys-maint@localhost' (Using password: YES)
2 Connect Access denied for user: 'debian-sys-maint@localhost' (Using password: YES)
3 Connect Access denied for user: 'debian-sys-maint@localhost' (Using password: YES)
4 Connect Access denied for user: 'debian-sys-maint@localhost' (Using password: YES)
是什么原因呢?如何处理?
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]
firehare
帖子: 2625 注册时间: 2005-04-10 16:54
来自: 温州大学
联系:
#2
帖子
由 firehare » 2005-07-29 20:30
??
你有使用debian-sys-maint@localhost用户吗?
这个用户虽然存在,但基本上用户是用不到的呀
在我的MySQL的日志中也没有该用户的使用记录!
我心无畏,源自于我心无知。
yongyi
帖子: 3025 注册时间: 2005-05-07 23:57
联系:
#3
帖子
由 yongyi » 2005-07-29 21:48
我也不知道了。我已经按你的SLAMP文章把除了root 用户都删除了。
对了,这一句
mysql> update user set user="myadmin" where user="root";
是不是就已经用myadmin取代了root,并且root已经不存在于user表中了?也就是说不能再登陆mysql了?
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]
firehare
帖子: 2625 注册时间: 2005-04-10 16:54
来自: 温州大学
联系:
#4
帖子
由 firehare » 2005-07-30 1:16
是的!这样的话,的确是用Myadmin取代了root!
另:
如果不行的话,你先备个份,再把那个用户删除了,看看是否能解决问题
我心无畏,源自于我心无知。
yongyi
帖子: 3025 注册时间: 2005-05-07 23:57
联系:
#5
帖子
由 yongyi » 2005-07-30 9:18
可是,好像根本没这用户的呢?
mysql> use mysql;
Database changed
mysql> select * from user;
+-----------+--------+----------+-------------+-------------+-------------+-----
--------+-------------+-----------+-------------+---------------+--------------+
-----------+------------+-----------------+------------+------------+-----------
---+------------+-----------------------+------------------+--------------+-----
------------+------------------+----------+------------+-------------+----------
----+---------------+-------------+-----------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Dele
te_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv |
File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_pr
iv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl _slave_priv | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subj ect | max_questions | max_updates | max_connections |
+-----------+--------+----------+-------------+-------------+-------------+----- --------+-------------+-----------+-------------+---------------+--------------+ -----------+------------+-----------------+------------+------------+----------- ---+------------+-----------------------+------------------+--------------+----- ------------+------------------+----------+------------+-------------+---------- ----+---------------+-------------+-----------------+
| localhost | yongyi | | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 |
+-----------+--------+----------+-------------+-------------+-------------+----- --------+-------------+-----------+-------------+---------------+--------------+ -----------+------------+-----------------+------------+------------+----------- ---+------------+-----------------------+------------------+--------------+----- ------------+------------------+----------+------------+-------------+---------- ----+---------------+-------------+-----------------+
1 row in set (0.03 sec)
[/code]
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]
yongyi
帖子: 3025 注册时间: 2005-05-07 23:57
联系:
#7
帖子
由 yongyi » 2005-07-30 10:03
啊?!
可能是被我全部删除了吧
请问这句:
mysql> delete from user where not (host="localhost" and user="root");
会不会把debian-sys-maint@localhost 给删除了的?我理解是会的哦。
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]
firehare
帖子: 2625 注册时间: 2005-04-10 16:54
来自: 温州大学
联系:
#8
帖子
由 firehare » 2005-07-30 10:15
呀!糟糕!
这句给漏看了,如果不是For Ubuntu的话这句是没什么关系的,看来这句不要就是了!
我心无畏,源自于我心无知。
firehare
帖子: 2625 注册时间: 2005-04-10 16:54
来自: 温州大学
联系:
#9
帖子
由 firehare » 2005-07-30 10:33
已经在SLAMP中改了!
=========================================
更正:感谢YongYi兄弟找出了BUG!
在本文中有以下语句:
c)然后我们删除多余的数据库并去掉匿名帐号
[root@debian ~]mysql -u root -p
Enter password:XXXXXX
mysql> drop database test;
mysql> use mysql;
mysql> delete from db;
mysql> delete from user where not (host="localhost" and user="root");
mysql> flush privileges;
更正为
c)然后我们删除多余的数据库并去掉匿名帐号
[root@debian ~]mysql -u root -p
Enter password:XXXXXX
mysql> drop database test;
mysql> use mysql;
mysql> delete from db;
mysql> delete from user where user = '';
mysql> delete from user where not(host="localhost") and user="root";
mysql> flush privileges;
_________________
我心无畏,源自于我心无知。
yongyi
帖子: 3025 注册时间: 2005-05-07 23:57
联系:
#10
帖子
由 yongyi » 2005-07-30 10:36
帮忙看看现在如何加上这用户,权限好像跟root 一样,但密码呢?
其实这用户是有什么用处的?
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]
firehare
帖子: 2625 注册时间: 2005-04-10 16:54
来自: 温州大学
联系:
#11
帖子
由 firehare » 2005-07-30 10:51
看样子好象是做维护用的!具体我也不太清楚,这个好象只有Debian和Ubuntu才有!
我心无畏,源自于我心无知。
yongyi
帖子: 3025 注册时间: 2005-05-07 23:57
联系:
#12
帖子
由 yongyi » 2005-07-31 8:10
重装了一下mysql就好了:
代码: 全选
sudo apt-get --purge remove mysql-server mysql-common
sudo aptitude install mysql-server php4-mysql amarok
独自看一看大海
总想起身边走在路上的朋友
Lenovo E290-420[Celeron-M420/256M/60G/Intel GMA950]
firehare
帖子: 2625 注册时间: 2005-04-10 16:54
来自: 温州大学
联系:
#13
帖子
由 firehare » 2005-07-31 9:42
O!
那倒还简单!嘻嘻!!
我心无畏,源自于我心无知。