1. Installation
I am using CentOS 7, the default Yum installation, but the default Yum installation version is a bit low, you can choose to upgrade as needed, I choose to upgrade and install first.
Update Yum
Update Yum Package yum-y update
Configuring the Yum Source
Vi/etc/yum.repos.d/mariadb.repo
Enter the following in the text that opens:
[Mariadb]name = Mariadbbaseurl = http://yum.mariadb.org/10.1/rhel7-amd64gpgkey=https://yum.mariadb.org/ Rpm-gpg-key-mariadbgpgcheck=1
The current stable version of 10.1, re-installed when you can go here to inquire https://downloads.mariadb.org/mariadb/repositories/#mirror =tuna&distro=centos &distro_release=centos7-amd64--centos7
Save and exit to start the installation
Installing Serveryum Install Mariadb-server mariadb-y
2. Service
After the installation is complete, we need to execute the following command:
Start service systemctl start mariadb//boot systemctl enable mariadb//run status Systemctl status mariadb
3. Configuration
Now we need to make some basic security settings. Execute command:
Mysql_secure_installation
Execute the upper command, enter the Setup boot
1. Confirm password Enter current password to root (enter for none): //Direct Enter//2, set new password set root password? [y/n] Y//3, remove the anonymous user remove anonymous users? [y/n] Y//4, disable remote login disallow root login remotely? [y/n] Y//5, move out test database-Remove-test databases and access to it? [y/n] Y//6, reload permissions reload privilege tables now? [y/n] ythanks for using mariadb! end
4. Other
View version mysql-v//login mysql-u root-p//Restart systemctl Restart mariadb//Stop Systemctl stop Mariadb.service
About Upgrade notes:
If you have previously installed, you want to upgrade, you can first uninstall, then repeat the above steps to install, note the database backup.
Stop service Systemctl Stop mariadb//Remove package yum Remove Mariadb-server mariadb mariadb-libs//cleanup Yum Clean all
Article Source: http://www.cnblogs.com/anech/p/6844849.html
Mysql MARIADB Installation