时间:2021-07-01 10:21:17 帮助过:60人阅读
昨天同事碰到一个问题,在MySQL上创建了一个用户,host设置为%,本地竟然无法登录。创建一个host为localhost的同名用户后,本地可以登录。感脚很怪异,下面我们重新分析产生这个问题的原因。
*root本地登录
Shell>./mysql -urootWelcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 7Server version: 5.5.17-debug-log Source distributionCopyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.bitsCN.com