登陸數據庫保存 [root@localhost Percona-Server-5.6.34-rel79.1-Linux.x86_64.ssl101]# bin/mysql -h localhost -P 3306 -uroot -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
使用-S連接socket的方式登錄數據庫 [root@localhost Percona-Server-5.6.34-rel79.1-Linux.x86_64.ssl101]# bin/mysql -S /u01/mysql_data/mysql.sock -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 Server version: 5.6.34-79.1-log Percona Server (GPL), Release 79.1, Revision 1c589f9
Copyright (c) 2009-2016 Percona LLC and/or its affiliates 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.
使用-h接主機名的方式連接到數據庫
[root@localhost Percona-Server-5.6.34-rel79.1-Linux.x86_64.ssl101]# bin/mysql -h localhost.localdomain -P 3306 -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 30
Server version: 5.6.34-79.1-log Percona Server (GPL), Release 79.1, Revision 1c589f9
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
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.