连接报错是mysql版本原因吗

[root@sm251v-xtqtmhx2 scripts]# mysql -h10.100.30.51 -P2883 -uroot@xun12#ob425 -pkyab@123456
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (42000): Access denied for user ‘root’@‘xxx.xxx.xxx.xxx’ (using password: NO)
mysql版本8.0.24

看着是没输入密码啊~

这样试试

mysql -h10.100.30.51 -P2883 -uroot@xun12#ob425 -p’kyab@123456’

密码加了单引号也是一样的报错

有可能是@特殊字符造成的 用反引号试一下

1 个赞

换obclient试试

重新设定密码,不要用@字符

我试试

密码试一试用双引号引起

试过了 去掉@后也不行
ERROR 1045 (42000): Access denied for user ‘root’@‘xxx.xxx.xxx.xxx’ (using password: NO)

可以试下不把密码放命令行里面。-p 回车再输入密码,确认密码是否正确

换了5.7的版本正常了

ob的版本哪个版本

可以在下载中心下载一个obclient并安装,一劳永逸