grant all privileges on *.* to root@"%" identified by ".";
时间: 2024-01-01 07:04:08 浏览: 241
回答: 根据引用\[1\]中的信息,你的语句"grant all privileges on *.* to root@"%" identified by ".";"报错了。根据引用\[2\]中的解决方法,如果你使用的是mysql8.0及以上版本,你应该使用以下语句来授予远程连接权限:create user root@'%' identified by '123456'; grant all privileges on *.* to root@'%' with grant option;。这样你就可以成功授予root用户在任何主机上的所有数据库的所有权限了。
#### 引用[.reference_title]
- *1* *2* [解决mysql的赋权操作之GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘123456‘ WITH ...](https://blog.csdn.net/shengyin714959/article/details/127764843)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [mysql远程连接权限grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant ...](https://blog.csdn.net/weixin_45949736/article/details/126942157)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文