ITPub博客

首页 > Linux操作系统 > Linux操作系统 > rhel4 mysql5.1登陆ERROR 1045 (28000): Access denied for user

rhel4 mysql5.1登陆ERROR 1045 (28000): Access denied for user

原创 Linux操作系统 作者:wisdomone1 时间:2010-06-19 17:04:10 0 删除 编辑

[root@capitek1 mysql]# mysql -uroot -p -h192.168.125.8
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'capitek1' (using password: YES)

 

修改/etc/my.cnf client节中的socket,因为登陆mysql server是通过客户端工具:mysql等

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
#socket         = /var/lib/mysql/mysql.sock
socket          = /mysql/data/mysql/mysql.sock

[root@capitek1 bin]# mysql -uroot -p123456 -hlocalhost #再次登陆ok
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.1.48-community-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-665684/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690170