This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12893|Reply: 0

[Source] Please read "Security" section of the manual to find out how...

[Copy link]
Posted on 1/10/2019 1:13:54 PM | | |
2019-01-10T02:50:46.445845Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2019-01-10T02:50:46.450122Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.13) starting as process 13142
2019-01-10T02:50:46.455115Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2019-01-10T02:50:46.455183Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-01-10T02:50:46.455718Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.13)  MySQL Community Server - GPL.

When installing CentOS in the virtual machine, I installed the Nami version of Rendmine, there was no MySQL auto-start, and it appeared when starting manually Please read "Security" section of the manual to find out how to run mysqld as root! mysql.info the Security section, it was found that it was because MySQL did not want the root user to start mysql directly for security. Here is the original text from the documentation:



*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 the
  `--user=root' option.

Never start MySQL Server with a root account. This is a smile because a user with FILE permission will cause MySQL Server to create a file with a root account (e.g., ~root/.bashrc), and to prevent something like this from happening, mysqld defaults to denying the user to start with a root account, but the root user can do so by adding it to the command"--user=root" option to force mysqld to start

  *Note `mysqld': mysqld. can (and should) 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 approach than starting MySQL with root is to allow MySQL with a plain user account with no advanced privileges, such as creating a user account called MySQL to manage MySQL specifically. The way to start MySQL with its account is to add a user option to the mysqld command, which 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 the my.cnf file:


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 allows you to start MySQL with a specified user account, 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 the
  `user' table. _User names for MySQL accounts have nothing to do
  with user names for Unix accounts_.

Don't start with Unix root doesn't mean you want to modify the root username in the user table in MySQL, because Unix's root account has nothing to do with MySQL's root account.




Previous:Ethereum technical materials Chinese e-book
Next:Java recursively reads all file paths under the directory
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com