標題: mysql -h登錄報錯不用-h正常的原因 [打印本頁] 作者: orablue 時間: 2016-03-18 21:01 標題: mysql -h登錄報錯不用-h正常的原因 請問為什么-h登錄本機不行,但是不用-h是可以的,請問原因是什么?
-bash-4.1$ mysql -h192.168.56.102 -P4001 -uroot -proot
ERROR 1045 (28000): Access denied for user 'root'@'192.168.56.102' (using password: YES)
-bash-4.1$
-bash-4.1$ mysql -uroot -proot --socket=/data/data/4001/mysql.sock --port=4001
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.24-enterprise-commercial-advanced-log MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2013, 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.