1 Check if mariadb of CentOS is installed
[root@localhost ~]# yum list installed | grep mariadb-server
mariadb-server.x86_64 1:5.5.50-1.el7_2 @updates
2 If mariadb-server is installed, how to uninstall CentOS system mariadb-server database?
Input: yum -y remove mariadb-server.x86_64 , if there are multiple dependent files, uninstall them in sequence.
When the result is displayed as Complete! The uninstallation is complete.
3 Check the mariadb-server version information on the yum library (the CentOS system needs to be connected to the network normally).
Input: yum list | grep mariadb-server or yum -y list mariadb-server*
4 Check mariadb dependencies
[root@localhost ~]# yum search mariadb
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
5 Install mysql database using yum
[root@localhost ~]# yum install mariadb-server -y
6 View the version information of the mysql database just installed.
Input: rpm -qi mysql-server
[root@localhost ~]# rpm -qi mariadb-server
Name : mariadb-server
Epoch : 1
Version : 5.5.50
Release : 1.el7_2
Architecture: x86_64
7 Start
[root@localhost ~] # systemctl start mariadb.service
8 boot mariadb
[root@localhost ~]# systemctl enable mariadb.service
9 status
[root@localhost ~]# systemctl status mariadb.service
10 login
[root@localhost ~]# mysql
11 login
[ root@localhost ~]# mysql -uroot -p
CentOS uses yum to install mariaDB (open source MySQL)
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326943941&siteId=291194637
Recommended
Ranking