In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Most people do not understand the knowledge points of this "CentOS7.2 installation MariaDB instance Analysis" article, so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "CentOS7.2 installation MariaDB instance Analysis" article.
Introduction to mariadb
Mariadb database management system is a branch of mysql and is mainly maintained by the open source community. The purpose of licensing mariadb with gpl is to be fully compatible with mysql, including api and the command line, making it an easy replacement for mysql. In terms of storage engine, xtradb (English: xtradb) is used instead of mysql's innodb. Mariadb was developed by michael widenius (English: michael widenius), the founder of mysql, who earlier sold his company, mysql ab, to sun for $1 billion. Since then, with the acquisition of sun by Oracle, the ownership of mysql has also fallen into oracle's hands. The name mariadb comes from the name of michael widenius's daughter maria.
Install mariadb 5.5
Install mariadb 5.5is the default version of centos 7, configure the database server
[root@linuxprobe~] # yum-y install mariadb-server [root@linuxprobe~] # vi / etc/my.cnf# add follows within [mysqld] Section [mysqld] character-set-server=utf8 [root@linuxprobe~] # systemctl start mariadb [root@linuxprobe~] # systemctl enable mariadbln-s'/ usr/lib/systemd/system/mariadb.service''/ etc/systemd/system/multi-user.target.wants/mariadb.service'
Initialize mariadb
The copy code is as follows:
[root@linuxprobe~] # mysql_secure_installation # like mysql, all the way y
Connect mariadb
[root@linuxprobe] # mysql-u root-penter password: welcome to the mariadb monitor. Commands end with; or\ g.your mariadb connection id is 1023server version: 5.5.50-mariadb mariadb servercopyright (c) 2000, 2016, oracle, mariadb corporation ab and others.type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mariadb [(none)] > select user,host,password from mysql.user +-+ | user | host | password | +- -+ | root | localhost | * f1dae8bcdfca7a57f246e0f834ac35830a3d640e | | root | 127.0.0.1 | * f1dae8bcdfca7a57f246e0f834ac35830a3d640e | | root |:: 1 | * f1dae8bcdfca7a57f246e0f834ac35830a3d640e | +- -+ 5 rows in set (0.00 sec) mariadb [(none)] > show databases +-+ | database | +-+ | information_schema | | mysql | | performance_schema | +-+ 5 rows in set (0.05 sec) mariadb [(none)] > exit;bye
Firewall opens port 3306
# client setting [root@vdevops ~] # firewall-cmd-- add-service=mysql-- permanentsuccess [root@vdevops ~] # firewall-cmd-- reloadsuccess
Install phpmyadmin
To install the web server and php, refer to the following:
Install phpmyadmin
# install from epel [root@linuxprobe~] # yum-- enablerepo=epel-y install phpmyadmin php-mysql php-mcrypt [root@linuxprobe~] # vi / etc/httpd/conf.d/phpmyadmin.conf# line 17: ip address you permit to accessrequire ip 127.0.0.1 10.1.1.0 and 2pm line 34: ip address you permit to accessrequire ip 127.0.0.1 10.1.1.o/24 [root@linuxprobe~] # systemctl restart httpd
Use a web browser to access "http:// (your hostname or ip address) / phpmyadmin / 'from the client, and then the user on mariadb logs in on the following screen. This example continues using the root user.
After logging in, you can operate mariadb here
Mariadb master-slave replication
Mariadb master-slave replication is the same as mysql master-slave replication. Go to:
Install mariadb 10.1
Configure centos sclo Source Warehouse
The copy code is as follows:
[root@linuxprobe] # yum-- enablerepo=centos-sclo-rh-y install rh-mariadb101-mariadb-server
Packages from centos-sclo-rh are installed in the / opt directory. To use it, load the environment variables as follows.
[root@linuxprobe ~] # scl enable rh-mariadb101 bash [root@linuxprobe ~] # mysql-vmysql ver 15.1 distrib 10.1.14-mariadb, for linux (x86 / 64) using editline wrapper [root@linuxprobe ~] # which mysql/opt/rh/rh-mariadb101/root/usr/bin/mysql
If you want to enable mariadb 10.1 automatically when you log in, please configure it as follows
[root@linuxprobe ~] # vi / etc/profile.d/rh-mariadb101.sh# create newborns: BASHSource / opt/rh/rh-mariadb101/enableexport xroomscls` = "`scl enable rh-mariadb101 'echo $xroomscls`"
Enable mariadb 10.1 and configure initial settings
The copy code is as follows:
[root@linuxprobe ~] # mysql_secure_installation
The above is about the content of this article "CentOS7.2 installation MariaDB instance Analysis". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.