日期:2014-05-16  浏览次数:20721 次

linux mysql 能登陆不能修改用户(cent os 6.2)
[root@3mao /]# select user,host,password from mysql.user
bash: syntax error near unexpected token `from'
[root@3mao /]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.61 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> select user,host,password from mysql.user
  ->  


想列表用户信息,都不行



 


------解决方案--------------------
select user,host,password from mysql.user ;


打个分号然后再回车。
------解决方案--------------------
少分号. 要不mysql客户端不知道语句结没结束.