Please read "Security" section of the manual to find out how to run mysqld as root! Troubleshooting

Source: Internet
Author: User

Nami Rendmine is installed when CentOS is installed in the virtual machine, and MySQL is not set to start automatically, during manual start, Please read "Security" section of the manual to find out how to run mysqld as root appears! Error, according to the prompt, checked the/opt/redmine-1.2.1-1/mysql/docs/mysql.info Security Section, found that because MySQL for Security, do not want the root user to directly start mysql. Below is the original article in the document:

* Never run the MySQL server as the Unix 'root' user. This is
Extremely dangerous, because any user with the 'file' privilege is
Able to cause the server to create files as 'root' (for example,
'~ Root/. bashrc '). To prevent this, * Note 'mysqld': mysqld. refuses
To run as 'root' unless that is specified explicitly using
'-- User = root' option.

Never use the root account to start MySQL Server. This is a smile, because users with the FILE Permission will make MySQL Server use the root account to create files (for example ,~ Root /. bashrc). to prevent similar events, mysqld rejects the user from starting with the root account by default, but the root user can forcibly start mysqld by adding the "-- user = root" option after the command.

* Note 'mysqld ': mysqld. can (and shocould) be run as an ordinary,
Unprivileged user instead. You can create a separate Unix account
Named 'mysql' to make everything even more secure. Use this
Account only for administering mysql. To start * Note 'mysqld ':
Mysqld. As a different UNIX user, add a 'user' option that
Specifies the user name in the '[mysqld] 'Group of the 'my. CNF'
Option file where you specify server options. For example:

[Mysqld]
User = MySQL

A better way than starting mysqld with a root user is to use a normal user account without advanced permissions to allow mysqld. For example, you can create a user account named MySQL to manage MySQL. Use its account to start

The method for moving MySQL is to add a user option after the mysqld command. This user belongs to the mysqld user group and is located in the my. CNF configuration file. For example, after creating a MySQL account, you can add the following content to my. CNF

In:

[Mysqld]

User = mysql

This causes the server to start as the designated user whether you
Start it manually or by using * Note 'mysqld _ safe ': mysqld-safe. Or
* Note 'mysql. Server': mysql-server. For more details, see * Note
Changing-mysql-user ::.

This option enables you to use the specified user account to start MySQL. You can use either mysqld_safe or mysql. server commands.

Running * Note 'mysqld ': mysqld. as a Unix user other than 'root'
Does not mean that you need to change the 'root' user name in
'User' table. _ user names for MySQL accounts have nothing to do
With user names for Unix accounts _.

Do not start with a Unix root user. This does not mean that you need to modify the root user name in the MySQL user table, because the Unix root Account has nothing to do with the MySQL root Account.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.