mysql 安装error1130_解决MySQL远程登录时出现ERROR 1130错误问题_MySQL

在用mysql进行远程连接时出现下列错误

[root@openfire ~]# mysql -u root -h mysql.clvn.com.cn -p

Enter password:

ERROR 1130 (HY000): Host '192.168.0.15' is not allowed to connect to this MySQL server

解决方法:

[root@mysql ~]# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or /g.

Your MySQL connection id is 10

Server version: 5.1.71 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.

mysql> GRANT ALL PRIVILEGES ON openfire.* TO 'root'@'192.168.0.15' IDENTIFIED BY 'redhat' WITH GRANT OPTION;

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

再次进行登录测试

[root@openfire ~]# mysql -u root -h mysql.clvn.com.cn -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or /g.

Your MySQL connection id is 22

Server version: 5.1.71 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.

mysql> exit

Bye

问题解决

相关标签:

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MySQL Deadlock ERROR 1213 (40001)是一个常见的错误,通常发生在高并发的情况下。这个错误表示在一个事务中出现了死锁,也就是两个或多个事务相互等待对方释放资源的情况。下面是排查这个错误的一般步骤: 1. 查看错误日志 首先,查看MySQL错误日志,以了解死锁的详细信息。可以使用以下命令查看错误日志: ``` sudo tail -f /var/log/mysql/error.log ``` 2. 查看死锁信息 在错误日志中,可以看到死锁的详细信息,包括哪些事务参与了死锁、哪些表和行受到了影响等。可以使用以下命令查看当前的死锁信息: ``` SHOW ENGINE INNODB STATUS; ``` 3. 分析死锁原因 分析死锁的原因非常重要,因为只有找到原因,才能采取相应的措施来避免死锁。通常,死锁的原因包括以下几个方面: - 并发访问同一行数据 - 事务执行顺序不当 - 事务中使用了不同的锁类型 4. 解决死锁问题 解决死锁问题的方法也有很多种,根据死锁的原因不同,采取的措施也会有所不同。以下是一些常用的解决方法: - 优化SQL语句,减少事务执行间 - 使用合适的锁类型,例如行锁、表锁、读锁、写锁等 - 调整事务隔离级别 - 对于高并发的场景,可以考虑使用分布式数据库或者缓存等技术来降低单个数据库的压力 综上所述,排查MySQL Deadlock ERROR 1213 (40001)错误需要综合考虑多方面的因素,并采取相应的措施来解决问题
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值