mysql server问题汇总
2016-07-14 12:43
423 查看
【问题1】
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
【解决】
1、check listened port
# netstat -tnulp|grep 3306
tcp 0 0 :::3306 :::* LISTEN 11781/mysqld
#
2、connect to mysql with specified host
# mysql -uroot -h:: -p
3、input your passowrd in right,you will login successfully
【问题2】
# mysql -uroot -h:: -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.13
Copyright (c) 2000, 2016, 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> status;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
【解决】
mysql> SET PASSWORD = PASSWORD('passw0rd');
Query OK, 0 rows affected, 1 warning (0.00 sec)
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
Database changed
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('passw0rd');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.7.13, for linux-glibc2.5 (x86_64) using EditLine wrapper
Connection id: 3
Current database: mysql
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.13
Protocol version: 10
Connection: :: via TCP/IP
Server characterset: utf8mb4
Db characterset: latin1
Client characterset: utf8mb4
Conn. characterset: utf8mb4
TCP port: 3306
Uptime: 7 min 47 sec
Threads: 1 Questions: 56 Slow queries: 0 Opens: 137 Flush tables: 1 Open tables: 130 Queries per second avg: 0.119
--------------
mysql> 阅读更多
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
【解决】
1、check listened port
# netstat -tnulp|grep 3306
tcp 0 0 :::3306 :::* LISTEN 11781/mysqld
#
2、connect to mysql with specified host
# mysql -uroot -h:: -p
3、input your passowrd in right,you will login successfully
【问题2】
# mysql -uroot -h:: -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.13
Copyright (c) 2000, 2016, 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> status;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
【解决】
mysql> SET PASSWORD = PASSWORD('passw0rd');
Query OK, 0 rows affected, 1 warning (0.00 sec)
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
Database changed
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('passw0rd');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> status;
--------------
mysql Ver 14.14 Distrib 5.7.13, for linux-glibc2.5 (x86_64) using EditLine wrapper
Connection id: 3
Current database: mysql
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.13
Protocol version: 10
Connection: :: via TCP/IP
Server characterset: utf8mb4
Db characterset: latin1
Client characterset: utf8mb4
Conn. characterset: utf8mb4
TCP port: 3306
Uptime: 7 min 47 sec
Threads: 1 Questions: 56 Slow queries: 0 Opens: 137 Flush tables: 1 Open tables: 130 Queries per second avg: 0.119
--------------
mysql> 阅读更多
相关文章推荐
- 项目从mysql移植到SQL sqlserver问题汇总
- 项目从mysql移植到SQL sqlserver问题汇总
- Cacti监控MySQL实现过程中碰到的问题解汇总
- MySQL server has gone away 问题的解决方法
- 烦人的问题:Client does not support authentication protocol requested by server; consider upgrading MySQL client
- MySQL 日常问题整理汇总!
- Mysql-Server5.5默认编码修改问题
- mysql 数据库连接池问题--can not connect to mysqlserver,Too many connections -mysql1041
- 关于 Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock的问题
- MySQL server has gone away 问题的解决方法
- mysql进阶(十六)常见问题汇总
- MySQL提示:The server quit without updating PID file问题的解决办法
- MySQL 卸载重装出现的问题:MySQL Server Instance Configuration Wizard 未响应
- MySQL Server 5.7安装遇到的问题及解决
- cant connect to MYSQL server on localhost(mysql日常小问题)
- 解决MySQL Server Instance Configuration Wizard卡住未响应的问题
- mysql乱码问题与解决办法汇总(1)
- Bugzilla+Windows server+xampp 安装问题汇总
- 解决ERROR 2006 (HY000) at line XX: MySQL server has gone away问题
- mysql 启动问题总结:the server quit without updating PID file(转)