In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
It is necessary to install the MySQL server
Train of thought:
Start multiple mysqld processes
Planning multiple sets of data
Plan multiple port
Plan multiple log paths
Multi-instance configuration:
Create multiple sets of directories:
Mkdir-p / data/330 {7pm 8pm 9}
Prepare multiple sets of profiles:
Vim / data/3307/my.cnf
[mysqld]
Basedir=/app/mysql
Datadir=/data/3307
Port=3307
Server_id=3307
Log-error=/data/3307/mysql.log
Log-bin=/data/3307/mysql-bin
Socket=/data/3307/mysql.sock
Touch / data/3308/my.cnf
Cp 3307/my.cnf 3308/my.cnf
Sed-I's 3307 / 3308 / 3308 / g '3308/my.cnf
Touch / data/3309/my.cnf
Cp 3307/my.cnf 3309/my.cnf
Sed-I's 3307 / 3309 / 3309 / g '3309/my.cnf
Note: the format of each corresponding configuration file is the same
Initialize multiple sets of data:
/ app/mysql/scripts/mysql_install_db\
-basedir=/app/mysql-datadir=/data/3307-user=mysql
The other two instances do the same thing.
Start each instance:
Mysqld_safe-- defaults-file=/data/3307/my.cnf &
Mysqld_safe-- defaults-file=/data/3308/my.cnf &
Mysqld_safe-- defaults-file=/data/3309/my.cnf &
Check to see if it starts: if you see the corresponding port number represents success
Netstat-utpln | grep 330
Ps-ef | grep mysqld
Login method:
Mysql-S / data/3307/mysql.sock
If you can log in to the database, it means success.
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.