免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2223 | 回复: 6
打印 上一主题 下一主题

fedora10下mysql连接不上的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-25 15:07 |只看该作者 |倒序浏览
[root@localhost srcs]# service mysqld start
启动 MySQL:                                               [确定]
[root@localhost srcs]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@localhost srcs]# killall mysqld
[root@localhost srcs]# mysqld_safe --skip-grant-tables&
[1] 17351
[root@localhost srcs]# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql

[root@localhost srcs]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

论坛徽章:
0
2 [报告]
发表于 2009-03-25 15:10 |只看该作者
mysql> select * from user;
---------------+
| Host      | User | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | ssl_type  | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
| localhost | root | 0178e9f36f8d0627 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | SPECIFIED | Y          |             |              |           500 |         500 |             500 |      

论坛徽章:
0
3 [报告]
发表于 2009-03-25 15:11 |只看该作者
mysql> update user set password=PASSWORD('123456') where USER='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
[root@localhost srcs]# killall mysqld
[root@localhost srcs]# mSTOPPING server from pid file /var/run/mysqld/mysqld.pid
090325 15:04:36  mysqld ended


bash: m: command not found
[1]+  Done                    mysqld_safe --skip-grant-tables
[root@localhost srcs]# service mysqld start
启动 MySQL:                                               [确定]
[root@localhost srcs]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@localhost srcs]#
[root@localhost srcs]

论坛徽章:
34
亥猪
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉鸡
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龙
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系统版块每日发帖之星
日期:2015-11-06 06:20:00操作系统版块每日发帖之星
日期:2015-11-08 06:20:00操作系统版块每日发帖之星
日期:2015-11-19 06:20:00黄金圣斗士
日期:2015-11-24 10:43:13
4 [报告]
发表于 2009-03-26 09:00 |只看该作者

比较麻烦

多试几个用户,然后检查下日志吧~

论坛徽章:
0
5 [报告]
发表于 2009-03-31 20:10 |只看该作者
日志看不明白,而且这种情况下也不能创建用户。
重装之后还是不行。
最后我的解决办法是删除了系统中mysql相关的那些配置文件然后重装。
之后正常使用。

论坛徽章:
34
亥猪
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉鸡
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龙
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系统版块每日发帖之星
日期:2015-11-06 06:20:00操作系统版块每日发帖之星
日期:2015-11-08 06:20:00操作系统版块每日发帖之星
日期:2015-11-19 06:20:00黄金圣斗士
日期:2015-11-24 10:43:13
6 [报告]
发表于 2009-04-01 13:02 |只看该作者
难道是 mysql 用户没有读取 mysql 库中认证部分的权限?

论坛徽章:
0
7 [报告]
发表于 2009-04-03 18:17 |只看该作者
不太清楚,应该是读取哪个地方出现错误了吧。开始的时候也是正确的,不知道为什么突然不行了。删除重装之后才正常使用的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP