Home >Database >Mysql Tutorial >Detailed explanation of mysql restarting MariaDB under Centos7
This article mainly introduces to you the relevant information on restarting MariaDB under Centos7 mysql. The introduction in the article is very detailed and has certain reference value for everyone. Friends who need it can read it together. Take a look.
Preface
MariaDB database management system is a branch of MySQL, which is mainly maintained by the open source community and is licensed under GPL. One of the reasons for developing this branch is that after Oracle acquired MySQL, there was a potential risk of closing MySQL as a source, so the community adopted a branch approach to avoid this risk. [3]
MariaDB aims to be fully compatible with MySQL, including API and command line, making it an easy replacement for MySQL. In terms of storage engines, XtraDB (named Aria) will be used to replace MySQL’s InnoDB from version 10.0.9
# yum install mysql -y # mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) 试着去启动mysql服务,仍然不行 # systemctl start mysql Failed to issue method call: Unit mysql.service failed to load: No such file or directory. # systemctl start mysql.service Failed to issue method call: Unit mysql.service failed to load: No such file or directory # systemctl enable mysql.service Failed to issue method call: Access denied
Here are the correct steps
# yum install mariadb-server -y systemctl stop mariadb.service # systemctl start mariadb.service # systemctl enable mariadb.service # mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 5.5.44-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>
Get it done!
How to set mysql root password
# mysql_secure_installation
Summary
The above is the detailed content of Detailed explanation of mysql restarting MariaDB under Centos7. For more information, please follow other related articles on the PHP Chinese website!