linux mysql 主从 1130_Linux系统下安装mysql时出现1045,1130错误的解决办法

环境 centos6.8 软件 mysql5.7.22

首先查询中是否是否有mysql

rpm -qa|grep mysql

yum -y remove 粘贴查询出来的文件

mysql安装完成登录时报1045,解决办法

1、打开etc目录下my.cnf文件

vi /etc/my.cnf [mysqld] 下加 skip-grant-tables

2、重启mysql服务

service mysqld restart

3、进入mysql修改密码

mysql -u root -p 回车 输入密码

>use mysql;

>update user set authentication_string=password('密码') where user='root';密码尽量要复杂,不然后面还有修改密码;

>flush privileges;

>quit;

4、删除 skip-grant-tables ,重启mysql服务

远程连接mysql服务时报1130,需要权限

1、进入mysql

mysql -u root -p 回车 输入密码

>use mysql;

>grant all privileges on *.* to 'root'@'x.x.x.x' identified by '密码';

>grant all privileges on *.* to 'root'@'x.x.x.x' identified by '密码' with grant option;

>flush privileges;

2、在远程连接过程中出现10060错误,需关闭系统防火墙

service iptables status

service iptables stop

chkconfig iptables off 永久关闭服务

希望与广大网友互动??

点此进行留言吧!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值