mysql update user错误_mysql常见问题解决方法.

1. 问题:mysql启动报错(linux)

[root@localhost ~]# service mysqld restart

Another MySQL daemon already running with the same unix socket.

Starting mysqld: [FAILED]

解决方法:

[root@localhost

~] mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

[root@localhost

~]# service mysqld restart

2. 问题:navicat连接mysql:报1130错误(windons)

1130: Host

xxx.xxx.xxx.xxx  is not allowedto connect to this MySQL server

解决方法:

mysql>use mysql

mysql>update user set host = '%'  where user ='root';

mysql>flush privileges;

mysql>select 'host','user' from user where user='root';

mysql>quit

3. 问题: navicat连接mysql:报1045错误

1045  Access denied for

user 'root'@'localhost' (using password:YES)

解决方法:

/etc/init.d/mysqld stop

mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

mysql -u root mysql

mysql> UPDATE user SET Password=PASSWORD('123456') where USER='root';

(UPDATE

user SET Password=PASSWORD('123456') where USER='root' and host='root' or

host='localhost';)

mysql> FLUSH PRIVILEGES;

mysql> quit

/etc/init.d/mysqld restart

4. 问题: navicat连接mysql:报10060错误

Can't connect to MySQL server (10060)

解决方法:

5. 问题:如何创建其他账号远程连接mysql服务器

mysql>use

mysql

mysql>GRANT ALL PRIVILEGES ON *.* TO 'sems_mysql'@'%' IDENTIFIED BY 'gziscassems' WITH GRANT OPTION;

6. 问题:

navicat连接mysql:报10061错误

2003-

can.t connect to MySQL server on xxx.xxx.xxx.xxx (10061)

解决方法:

启动mysql服务

[root@centos64 ~]# service mysqld start

/etc/init.d/mysqld

stop

mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

mysql -u root mysql

mysql> delete from user where USER='';

mysql> FLUSH PRIVILEGES;//记得要这句话,否则如果关闭先前的终端,又会出现原来的错误

mysql> quit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值