本文主要是介绍RedHat7下安装MySQL,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
# 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
下面讲正确的步骤
# yum install mariadb-server -y
# 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)]>
这篇关于RedHat7下安装MySQL的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!