4
回答
mysql用户的host设置了%,可是登录不进去
科大讯飞通用文字识别100000次/天免费使用。立即申请   

mysql> create user 'cloud'@'%' identified by '123456789';
Query OK, 0 rows affected (0.00 sec)

mysql> select host, user from user;
+-----------+-------+
| host      | user  |
+-----------+-------+
| %         | cloud |
| %         | root  |
| 127.0.0.1 | root  |
| ::1       | root  |
| localhost |       |
| localhost | root  |
| mysqltest |       |
| mysqltest | root  |
+-----------+-------+
8 rows in set (0.00 sec)

mysql> grant all privileges on txd.* to 'cloud'@'%' identified by '123456789' with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye



# mysql -ucloud -p123456789
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'cloud'@'localhost' (using password: YES)



登录不进去

<无标签>
举报
jack_jones
发帖于3年前 4回/3K+阅
顶部