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

MySQL how to run mysqld as ro

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

Share

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

scene

Version 5.6.44,[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! mysql here is for security reasons, and by default refuses to start mysql service with root account.

solve

1. Force root boot by adding--user=root to the command

mysqld --user=root

2. Start mysqld with a normal user. This user must belong to the mysqld user group and be in the my.cnf file. Use vi /etc/my.cnf

Add user=mysql to specify mysql user to start mysql service, or add user=root directly

[Set permissions]

Use the following command to see if there are mysql users and user groups

$ cat /etc/passwd #View user list

$ cat /etc/group #View user group list

If not, create it.

$ groupadd mysql

$ useradd -g mysql mysql

modify/usr/local/mysqld permissions

$ chown -R mysql:mysql /usr/local/mysqld

The second method failed!

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