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

The mysql service is not up due to port problems

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, a colleague said that his mysql database could not work, and he was very depressed. The error was as follows.

# / etc/init.d/mysql start

Starting MySQL.... ERROR! The server quit without updating PID file (/ data/mysql/mysql3306/data/mysql.pid).

I immediately thought of looking at the error log, which is as follows:

# vim error.log

2017-05-04T13:35:17.965606Z 0 [ERROR] Can't start server: Bind on TCP/IP port: Permission denied

2017-05-04T13:35:17.965643Z 0 [ERROR] Do you already have another mysqld server running on port: 1005?

2017-05-04T13:35:17.965674Z 0 [ERROR] Aborting

(1) the first reaction is insufficient permissions. Through investigation, the user permissions are sufficient, and the owner and group of the mysql data directory are all mysql, so they are excluded.

(2) the second sentence of the error indicates that there may be a mysql service occupying port 1005, so use the ss-nltup | grep mysql command to check that there are no mysql services.

(3) in the end, Baidu went online a lot, all to no avail, suddenly there is an idea, does the port range of mysql include 1005? So look at the manual and find as follows:

-- port=port_num

The port number that the server should use when listening for TCP/IP connections. The port number

Must be 1024 or higher unless the server is started by the root system user.

The manual is very clear, the port range of mysql is greater than or equal to 1024, it took so long to find that the original manual has long been written dead, really thankless, or honestly use the default port, read the manual more.

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