luke 发表于 2013-3-1 20:21:31

Mysql5.6完后mysql客户端死都连不上

平台:SUSE企业版11,mysql5.6.10
问题描述:使用64rpm包安装,没有问题,/etc/init.d/mysql start
服务也能启动,但是使用mysql或者mysqladmin死活链接不上。

PS:安装完后提示root的随机密码生成在~/.mysql.secret,要我在第一次链接的时候使用set password密码重设密码
现在死活链接不上,基本所有的语句都试了
mysql -uroot -prand_password set password for root@localhost=password('new_pass')
mysql -uroot -prand_password
mysqladmin -uroot password 'new_pass'
mysqladmin -uroot -prand_password password 'new_pass'

都提示连接被拒绝
error:you must SET PASSWORD before executing this statement
连都连不上我就不知道怎么去set password

求大侠指导,谢谢

穷要顶硬上 发表于 2013-3-5 15:17:12

我的也是老提示error:you must SET PASSWORD before executing this statement

luke 发表于 2013-3-25 19:40:28

使用--init-file=file选项,
如mysqld --init-file=./init_file
然后再file里面写上设置密码的语句
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('new_pass');即可

luke 发表于 2013-3-25 19:40:50

使用--init-file=file选项,
如mysqld --init-file=./init_file
然后再file里面写上设置密码的语句
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('new_pass');即可

flashcloudy 发表于 2013-5-28 13:02:04

页: [1]
查看完整版本: Mysql5.6完后mysql客户端死都连不上