Home  >  Article  >  Database  >  mysqld_safe - MySQL server startup script

mysqld_safe - MySQL server startup script

王林
王林forward
2023-08-30 14:17:021132browse

mysqld_safe - MySQL 服务器启动脚本

What is mysqld_safe

The mysqld_safe command is considered the correct way to start the mysqld server on Unix.

  • It adds certain security features, such as restarting the server when an error occurs and logging runtime information to the error log.

  • It attempts to start an executable named mysqld. In order to override this default behavior and explicitly specify the name of the server to run, the --mysqld or --mysqld-version option can be specified in mysqld_safe. --ledir can also be used to tell mysqld_safe in which directory it should look for the server.

  • Options that mysqld_safe does not understand are passed to mysqld only if they are specified on the command line. These options are ignored if specified in the [mysqld_safe] group of the options file.

  • It reads all options from the [mysqld], [server] and [mysqld_safe] sections of the options file.

  • For backward compatibility, mysqld_safe reads the [safe_mysqld] section, but to stay current, users should rename these sections to [mysqld_safe].

  • mysqld_safe can accept options on the command line and in an option file,

To start or stop the server manually using the mysql.server script, please It is called from the command line using the start or stop parameters. As shown below −

shell> mysql.server start
shell> mysql.server stop

To use a specific tcmalloc library, you need to specify its full path name. Let’s look at an example −

[mysqld_safe]
malloc-lib=/opt/lib/libtcmalloc_minimal.so

The above is the detailed content of mysqld_safe - MySQL server startup script. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete