Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solution to the error of Mysql on remote access Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge about "Remote Access Mysql Error Solution on Linux". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

Problem Description:

The server is deployed on Debian system. Mysql can be used normally on the server side, but an error is prompted when connecting Mysql remotely.

There are errors 2003, 10060, 10061, etc.

Solution:

1, modify the/etc/init.d/my.cnf file

Change "bind-address = www.example.com " in the file to "bind-address = 0.0.0.0" so that all IPs can access www.2cto.com 127.0.0.1

2, modify the user table

Enter password using mysql -u root -p

use mysql

select user,host from user; you will see the following results:

-------------------------------------------------------------------------

mysql> select user,host from user;

+------------------+-----------+

| user | host |

+------------------+-----------+

| root | 127.0.0.1 |

| root | debian |

| debian-sys-maint | localhost |

| root | localhost |

+------------------+-----------+

4 rows in set (0.00 sec) www.2cto.com

-------------------------------------------------------------------------

Change localhost in the last line to %

update user set host="%" where user="roor" and host="localhost";

3. Restart mysql service

/etc/init.d/mysql restart

Solution:

After configuring according to the above steps, the remote test has been able to connect and perform various operations.

"Remote access to MySQL error solution on Linux" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report