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

What is the function of mysqld_multi in mysql

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail what the role of mysqld_multi in mysql is, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

_ multi is a script command used to manage multiple mysql instances. The main purpose of this experiment is to edit my.cnf. The first step is to create multiple different directories to hold different instances. Then use bin/mysql_install_db-- the directory of basedir=mysql-- the directory where datadir= data is stored-- the user to which user= belongs. After creating multiple mysql instances, edit the document my.cnf and add:

[mysqld_multi]

Mysqld=/usr/local/mysql/bin/mysqld_safe (according to your own installation path)

Mysqladmin=/usr/local/mysql/bin/mysqladmin (according to your own installation path)

User=mysql

Password=123456

[mysql3306 (must be an integer and each instance is different)]

Port=3306 (the port number of each instance must be different)

Socket=/tmp/mysql3306.sock (each instance socket file name cannot be the same)

Pid-file=/tmp/mysql3306.pid (the pid name of each instance cannot be the same)

Directory stored in basedir=mysql

The path where the datadir=mysql instance is stored

Other parameters can be increased or decreased according to their own needs.

Mysqld_multi-- defaults-file=/etc/my.cnf-- user=mysql start port number is in use. Start up.

Connect with mysql-S / tmp/mysql3306.sock.

You can also connect using the mysql-u mysql-P port number, protocol=tcp.

Create a user and password after connecting, otherwise you can't shut down the mysql instance.

The user name and password created should be the same as the user and password under [mysqld_multi] in the my.cnf file.

The created command is: grant shutdown on *. * to identified by 123456

Use show grants for; you can view information such as the user's permissions.

About what the role of mysqld_multi in mysql is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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