LINUX-MYSQL多实例(tar包安装)---问题
原创woxuewangluo 博主文章分类:MYSQL文档 ©著作权
©著作权归作者所有:来自51CTO博客作者woxuewangluo的原创作品,请联系作者获取转载授权,否则将追究法律责任
1、启动后关闭问题:
[root@localhost dbdata_3306]# /data/dbdata_3306/mysqld stop
Stoping MySQL...
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'admin'@'localhost' (using password: YES)'
解决方法:
[root@localhost dbdata_3306]# /usr/local/mysql/bin/mysql -u root -p -S /data/dbdata_3306/mysql.sock
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.60-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT SHUTDOWN ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@localhost dbdata_3306]# /data/dbdata_3306/mysqld stop
Stoping MySQL...
[root@localhost dbdata_3306]# /data/dbdata_3306/mysqld restart
Stoping MySQL...
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/data/dbdata_3306/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/data/dbdata_3306/mysql.sock' exists!
Starting MySQL...
[root@localhost dbdata_3306]# /data/dbdata_3306/mysqld restart
Stoping MySQL...
Starting MySQL...
[root@localhost dbdata_3306]#
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Linux-MySQL用户管理
Linux-MySQL用户管理
Linux MySQL 用户管理 -
Linux下Mysql 5.6.21 tar包安装实践
http://blog
数据库 开发工具 操作系统 mysql MySQL -
Linux 安装 Mysql - tar包
Linux 安装 Mysql - tar包
mysql linux 数据库