正常登录下发现一些命令可以正常使用,一些不能使用会出现
Ignoring query to other database
[root@master mysql]# ./bin/mysql -root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 8.0.23 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
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> use test1
Database changed
mysql> select *from user_info
-> select *from user_info;
Ignoring query to other database
mysql> show tables;
重新登录下,发现用户名root前面没有加u
再次试下问题解决
[root@master mysql]# ./bin/mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@master mysql]# ./bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 28
Server version: 8.0.23 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
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> use test1;
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> select *from user_info;
+----+--------------+-----------+------+
| id | user_name | pass_word | age |
+----+--------------+-----------+------+
| 1 | 卡夫斯基 | 123 | 18 |
+----+--------------+-----------+------+
1 row in set (0.00 sec)
mysql>