gpt4 book ai didi

mysql - 我无法使用 MySQL shell 连接 root@localhost

转载 作者:行者123 更新时间:2023-12-05 06:02:29 27 4
gpt4 key购买 nike

我在mysql中遇到了一些问题,

操作系统:centos7

MySQL:mysql Ver 8.0.19 for Linux on x86_64 (MySQL Community Server - GPL)

MySQL Shell:mysql-shell-8.0.23-1.el7.x86_64

我可以使用(mysql -uroot -p)连接mysql,但是我不能使用mysql shell连接mysql。

我的root密码是对的,怎么解决?

enter image description here

enter image description here

最佳答案

我解决了这个问题,我没有root权限,所以我用

create user root@"%" identified by '***';  
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

关于mysql - 我无法使用 MySQL shell 连接 root@localhost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66916037/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com