发布于 2015-05-24 22:55:16 | 3033 次阅读 | 评论: 2 | 来源: PHPERZ

这里有新鲜出炉的Mysql教程,程序狗速度看过来!

Mysql关系型数据库管理系统

MySQL是一个开放源码的小型关联式数据库管理系统,开发者为瑞典MySQL AB公司。MySQL被广泛地应用在Internet上的中小型网站中。由于其体积小、速度快、总体拥有成本低,尤其是开放源码这一特点,许多中小型网站为了降低网站总体拥有成本而选择了MySQL作为网站数据库。


问题描述

[root@itcast02 itcast]# /etc/init.d/mysql restart  //启动服务

 ERROR! MySQL server PID file could not be found!
Starting MySQL................ ERROR! The server quit without updating PID file (/var/lib/mysql/itcast02.pid).//出错

[root@itcast02 itcast]#mysql -u root -p //登录

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) //错误

[root@itcast02 itcast]# /etc/rc.d/init.d/mysqld status   //查看状态失败

bash: /etc/rc.d/init.d/mysqld: No such file or directory

解决方法

[root@itcast02 itcast]#chown -R mysql:mysql /var/lib/mysql    //设置权限

[root@itcast02 itcast]#/etc/init.d/mysql restart     //重新启动

 ERROR! MySQL server PID file could not be found!

Starting MySQL...... SUCCESS!    //启动成功

[root@itcast02 itcast]#mysql -u root -p  //再次登录 成功


最新网友评论  共有(2)条评论 发布评论 返回顶部
PHPERZ网友 发布于2016-10-18 12:07:35
你他妈的这个方法你试了吗?我草你妈,不知道从哪复制过来的,你麻痹,坑爹啊
支持(3)  反对(0)  回复
ph 发布于2016-07-04 15:36:32
支持(0)  反对(0)  回复

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务