欢迎投稿

今日深度:

关于centos7 安装mysql(mariadb)的方式,centos7mariadb

关于centos7 安装mysql(mariadb)的方式,centos7mariadb


 今天在Linux主机(CentOS 7)安装(yum install方式)Mariadb(即开源MySQL)后,无法启动mariadb,其实是安装不完整,当然启动不了,更不用说输入"mysql -u root"提示Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)了 。没什么技术含量的解决方法开始了。

安装mariadb,先搜索一发:

$ sudo yum search mariadb

出现:

$ sudo yum search mariadb
Loaded plugins: langpacks
============================= N/S matched: mariadb =============================
mariadb-bench.x86_64 : MariaDB benchmark scripts and data
mariadb-devel.i686 : Files for development of MariaDB/MySQL applications
mariadb-devel.x86_64 : Files for development of MariaDB/MySQL applications
mariadb-embedded.i686 : MariaDB as an embeddable library
mariadb-embedded.x86_64 : MariaDB as an embeddable library
mariadb-embedded-devel.i686 : Development files for MariaDB as an embeddable : library
mariadb-embedded-devel.x86_64 : Development files for MariaDB as an embeddable  : library
mariadb-libs.i686 : The shared libraries required for MariaDB/MySQL clients
mariadb-libs.x86_64 : The shared libraries required for MariaDB/MySQL clients
mariadb-server.x86_64 : The MariaDB server and related files
mariadb.x86_64 : A community developed branch of MySQL
mariadb-test.x86_64 : The test suite distributed with MariaD

嗯,把 mariadb mariadb-bench mariadb-server mariadb-embdedeb mariadb-libs mariadb-server都安装:

$  yum install mariadb-embedded mariadb-libs mariadb-bench mariadb mariadb-sever

启动mariadb,再试试"mysql -u root“发现可以了,好吧,作为一个Archlinuxer表示centos(或者说rpm系列?)的mariadb打包分得真细。

哦,那些个什么service xx start的命令在很多新版本的linux发行版上已经不适用了,正确的打开方式是systemctl  [option] [xx],mariadb(mysql)使用:

$ systemctl start mariadb

centos何时用systematl的我不知道,至少centos7用systemctl。开机自启动:

$ systemctl enable mariadb

www.htsjk.Com true http://www.htsjk.com/mariadb/36739.html NewsArticle 关于centos7 安装mysql(mariadb)的方式,centos7mariadb   今天在Linux主机(CentOS 7)安装(yum install方式)Mariadb(即开源MySQL)后,无法启动mariadb,其实是安装不完整,当然启动不了,更不用...
相关文章
    暂无相关文章
评论暂时关闭