问题描述
提示:这里描述具体问题:
server端用mysql5.7,然后远程链接,使用root账户和密码,可以正常链接,也可以创建数据库,但是在创建数据表时出现错误。提示如下:
Access denied for user 'root'@'% to database 'we'
原因分析:
提示:这里填写问题的分析:root 账户没有创建权限。
解决方案:
提示:这里填写该问题的具体解决方案:
从报错提示可以知道是权限不允许,所以我们需要查看root@%这个用户的权限:
首先root进入mysql5.7,输入密码即可
mysql -u root -p
然后按照提示输入
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 108
Server version: 5.7.33-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other name