In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to achieve multiple mysqld services on one machine, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Have you ever installed a lot of mysqld on one machine? If so, what do people usually do? Is it like I used to compile a lot of mysql, put it in different directories, and then start it one by one? If so, I highly recommend using mysqld_multi, which can quickly configure N mysqld.
The steps are as follows:
1) install a mysqld on the server, start, and configure the mysql user
2) mysql libraries under the Copy data directory to prepare a new mysql server (N)
3) configure mysqld_multi
For specific configuration, please refer to. / mysqld_multi-example
[mysqld_multi]
Mysqld = / usr/local/mysql/bin/mysqld_safe
Mysqladmin = / usr/local/mysql/bin/mysqladmin
User = yt
Password = yangting
[mysqld1]
Datadir=/usr/local/mysql/data/
Basedir=/usr/local/mysql
Port = 3306
Socket = / tmp/mysql.sock
[mysqld2]
Datadir=/usr/local/mysql/data2/
Basedir=/usr/local/mysql
Port = 3307
Socket = / tmp/mysql1.sock
Pid-file=/usr/local/mysql/data2/mysql2.pid
Default-storage-engine=innodb
[mysql]
Prompt=mysql--\\ u@\\ h:\\ d >
4) start and shut down
. / mysqld_multi-- log=/usr/local/mysql/data2/yt.err start
. / mysqld_multi-- log=/usr/local/mysql/data2/yt.err stop
It can also be started by mysqld_multi-- log=/usr/local/mysql/data2/yt.err start 1 start 3-10.
You can also. / mysqld_multi-- log=/usr/local/mysql/data2/yt.err stop 2 to close the second one.
Note: after getting up, make sure that each server has the user and password needed by mysqld_mult, and it must be localhost.
GRANT SHUTDOWN ON *. * TO IDENTIFIED BY 'yangting'
Otherwise, you can't stop
The above is all the contents of the article "how to implement multiple mysqld services on one machine". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.