安装完成中心云的mysql数据库,默认root用户,授权用户的没有权限

#查看root用户权限(显示n,表示没有给用户授权的权限)

MariaDB [mysql]> select Host,User,grant_priv from user;
+-----------+--------+------------+
| Host | User | grant_priv |
+-----------+--------+------------+
| localhost | root | N |
+-----------+--------+------------+
2 rows in set (0.00 sec)

 

#给root用户提权,把(N改成Y)

MariaDB [mysql]> update user set Grant_priv='Y' where User='root';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

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

 

#再创建用户,给用户授权

用phpmyadmin登录:

http://10.0.101.153/phpmyadmin

 

posted @ 2018-05-17 16:49  努力哥  阅读(1022)  评论(0)    收藏  举报