In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
System environment: CentOS 7 1611 (mariadb comes with the system after installation)
mariadb version: mariadb-5.5.56-linux-x86_64.tar.gz (Generic Linux)
Download address: mirrors.neusoft.edu.cn/mariadb//mariadb-galera-5.5.56/bintar-linux-x86_64/mariadb-galera-5.5.56-linux-x86_64.tar.gz
1. Download the universal binary program and expand it
[root@node1 tmp]# wget http://mirrors.neusoft.edu.cn/mariadb//mariadb-galera-5.5.56/bintar-linux-x86_64/mariadb-galera-5.5.56-linux-x86_64.tar.gz[root@node1 tmp]# tar -xf mariadb-5.56-linux-x86_64.tar.gz-C /usr/local/ #followed by mariadb installation path/usr/local
Create a directory to store the database and add mysql users
[root@node1 tmp]# mkdir -pv /mydata/data #Create directory where user stores data store files [root@node1 tmp]# useradd -r mysql #create mysql user as system user [root@node1 tmp]# chown mysql.mysql /mydata/data/ #Change the data storage path to mysql and mysql to group
3. Installation configuration mariadb
[root@node1 tmp]# cd /usr/local/[root@node1 local]# ln -sv mariadb-5.5.56-linux-x86_64 mysql'mysql' -> 'mariadb-5.5.56-linux-x86_64'[root@node1 local]# cd /usr/local/mysql/[root@node1 mysql]# chown -R root:mysql ./* #Modify/usr/local/mysql to root and mysql[root@node1 mysql]# ./ scripts/mysql_install_db --user=mysql --datadir=/mydata/data #Indicates the database file storage path and installation user [root@node1 mysql]# cp support-files/mysql.server /etc/init.d/mysqld #Add service startup script [root@node1 mysql]# chkconfig --add mysqld #Add service startup script to boot
4. Provide configuration files
[root@node1 mysql]# cp /etc/my.cnf{,.bak} #Backup mariadb configuration file [root@node1 mysql]# cp support-files/my-large.cnf /etc/my.cnf #Add system configuration script to default location [root@node1 mysql]# vim /etc/my.cnf [mysqld]datadir = /mydata/data #Indicates database file storage path innodb_file_per_table = ONskip_name_resolve = ON #Skip the process of resolving domain names when logging in to the database using IP
Common binary format installed service program its configuration file lookup order:
/etc/my.cnf --> /etc/mysql/my.cnf --> --default-extra-file=/PATH/TO/CONF_FILE --> ~/.my.cnf
Note: If the configuration file is not/etc/my.cnf, the configuration file path needs to be specified.
./ scripts/mysql_install_db --defaults-file=/PATH/TO/CONF_FILE (e.g.~/.my.cnf)
5. The installation is over, and the service can be started at this point.
[root@node1 mysql]# service mysqld start
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.