Home > Database > Mysql Tutorial > body text

mysqld_safe - MySQL server startup script

王林
Release: 2023-08-30 14:17:02
forward
1136 people have browsed it

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
Copy after login

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
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template