CentOS通过yum安装MariaDB(MySQL)无法启动服务或者找不到mysql.sock
转载自:http://www.linuxidc.com/Linux/2016-03/129396.htm
今天在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
(闲话)网上一堆老的不能再老的网页内容实在让菜鸟如我又不爱用什么centos(以及土豪reahat-贴吧常冒出新手问古董RedHat的问题……所谓教材的毒害啊)十分无奈,解决不了啊。有说yum安装rpm的mysql(mariadb)默认mysql.sock文件不在默认位置即/var/lib/mysql/,而在/temp/xxx下,要修改my.conf(现在mariadb的配置文件是my.cnf,少了一个o)里面的sock配置,或者软链接到默认位置;有的说权限问题如何如何;有的说卸载安装如何如何………其实只是安装不完整的啦。我的印象里,debian用apt装软件,拖家带口的,aptitude install mysql的话,全家桶应该必然的。这个小问题让我一阵好找,原来只是没安装全,除了服务器我还真没怎么用过centos或者Fedora,呵呵哒。
Linux系统教程:如何检查MariaDB服务端版本 http://www.linuxidc.com/Linux/2015-08/122382.htm
MariaDB Proxy读写分离的实现 http://www.linuxidc.com/Linux/2014-05/101306.htm
Linux下编译安装配置MariaDB数据库的方法 http://www.linuxidc.com/Linux/2014-11/109049.htm
CentOS系统使用yum安装MariaDB数据库 http://www.linuxidc.com/Linux/2014-11/109048.htm
安装MariaDB与MySQL并存 http://www.linuxidc.com/Linux/2014-11/109047.htm
Ubuntu 上如何将 MySQL 5.5 数据库迁移到 MariaDB 10 http://www.linuxidc.com/Linux/2014-11/109471.htm
[翻译]Ubuntu 14.04 (Trusty) Server 安装 MariaDB http://www.linuxidc.com/Linux/2014-12/110048htm
CentOS 7.0 使用 yum 安装 MariaDB 与 MariaDB 的简单配置 http://www.linuxidc.com/Linux/2016-03/128880.htm
MariaDB 的详细介绍:请点这里
MariaDB 的下载地址:请点这里
CentOS通过yum安装MariaDB(MySQL)无法启动服务或者找不到mysql.sock的更多相关文章
- Centos 使用YUM安装MariaDB
1.在 /etc/yum.repos.d/ 下建立 MariaDB.repo,内容如下: [azureuser@mono etc]$ cd /etc/yum.repos.d [azureuser@mo ...
- 【Centos】yum 安装mariaDB
[dream361@za ~]$ sudo yum search mariadb #查找需安装的包 mariadb-libs.x86_64 : The shared libraries require ...
- CentOS下yum安装PHP,配置php-fpm服务
yum list installed | grep php 先删除已有的php版本 ,执行下面的命令删除php yum remove php-common 然后像安装那样问你是否继续的,输入yes即可 ...
- CentOS 7.0 使用 yum 安装 MariaDB 与 MariaDB 的简单配置
1.安装MariaDB 安装命令 yum -y install mariadb mariadb-server 安装完成MariaDB,首先启动MariaDB,两条命令都可以 systemctl sta ...
- CentOS 7.0 使用 yum 安装 MariaDB
CentOS 7.0 使用 yum 安装 MariaDB 与 MariaDB 的简单配置 1.安装MariaDB 安装命令 yum -y install mariadb mariadb-serve ...
- centos下yum安装crontab+mysql自动备份
参考博文: centos下yum安装crontab yum install vixie-cron crontabs //安装 chkconfig crond on ...
- centos通过yum安装mysql
前言 前天按照Oracle上的文档装了一遍mysql,选了最新8.0的版本,后来出现一些问题,网上搜答案,出来的基本还是5.x版本的解决方案,并不适用8.0版本.然后我就去看了一下公司的正式环境买的阿 ...
- CentOS7下使用yum安装MariaDB
从CentOS 7开始,使用 MariaDB 替代默认的 MySQL.MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可 MariaDB的目的是完全兼容MyS ...
- ECS——CentOS7下使用yum安装MariaDB
CentOS 6 或早期的版本中提供的是 MySQL 的服务器/客户端安装包,但 CentOS 7 已使用了 MariaDB 替代了默认的 MySQL.MariaDB数据库管理系统是MySQL的一个分 ...
随机推荐
- BZOJ1076 [SCOI2008]奖励关 【状压dp + 数学期望】
1076: [SCOI2008]奖励关 Time Limit: 10 Sec Memory Limit: 128 MB Submit: 3074 Solved: 1599 [Submit][Sta ...
- 【NOIP 模拟赛】中值滤波 打表找规律
对于这样看起来不像什么算法也没什么知识点的题,一脸懵逼的话不是手推规律就是打表找规律......... 当然还有一些超出你能力之外的数学题...... #include <cstdio> ...
- Codeforces Round #525 (Div. 2)D. Ehab and another another xor problem
D. Ehab and another another xor problem 题目链接:https://codeforces.com/contest/1088/problem/D Descripti ...
- JavaBean定义、JSP中使用以及内省操作
Apache commons 一系列的开源工具室非常值得学习的实现. 一 JavaBean定义 JavaBean是一种可重复使用.且跨平台的软件组件.JavaBean可分为两种:一种是 ...
- Java并发(4)- synchronized与CAS
引言 上一篇文章中我们说过,volatile通过lock指令保证了可见性.有序性以及"部分"原子性.但在大部分并发问题中,都需要保证操作的原子性,volatile并不具有该功能,这 ...
- 【数据结构】bzoj1636/bzoj1699排队
Description 每天,农夫 John 的N(1 <= N <= 50,000)头牛总是按同一序列排队. 有一天, John 决定让一些牛们玩一场飞盘比赛. 他准备找一群在对列中为置 ...
- 2017南宁现场赛E The Champion
Bob is attending a chess competition. Now the competition is in the knockout phase. There are 2^r2r ...
- UVa11988 Broken Keyboard (a.k.a. Beiju Text)
题目复制太麻烦了,甩个链接 http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=18693 直接模拟光标操作时间复杂度较高,所以用链 ...
- bzoj1833: [ZJOI2010]count 数字计数 && codevs1359 数字计数
bzoj1833 codevs1359 这道题也是道数位dp 因为0有前导0这一说卡了很久 最后发现用所有位数减1~9的位数就okay.....orzczl大爷 其他就跟51nod那道统计1出现次数一 ...
- 进一步认识golang中的并发
如果你成天与编程为伍,那么并发这个名词对你而言一定特别耳熟.需要并发的场景太多了,例如一个聊天程序,如果你想让这个聊天程序能够同时接收信息和发送信息,就一定会用到并发,无论那是什么样的并发. 并发的意 ...