业界良心之拯救mysql

我的mysql5.5出了问题, 我忙了一天去解决它,心情很不好,因为我花了一天时间去解决一个工具的问题。百度了一下, 100000个搜索结果可能只有那一个版本,心情更不好了,终于明白为什么有人说百度是程序员的坟墓。 

结果是我在stackoverflow上找到了答案,上面的大神们,真心是业界良知。


回到这个问题上,我修改了my.cnf文件,应该是配置错误了,然后mysqld.sock文件消失,我不太了解其中的问题,在这里就不胡扯了,重新安装报错是

Unable to set password for the MySQL "root" An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server. You should check the account's password after the package installation. Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more information. 

运行或启动mysql报错:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'


最后的解决办法是:

1.dpkg --remove mysql-server-5.5

or just

dpkg --remove mysql-server

2.sudo apt-get purge -f mysql-server mysql-common

3.sudo apt-get install mysql-server mysql-common



其它可能有用的方法:

sudo apt-get remove apparmor 
and then re-attempt the installation with mysql-common package:

sudo apt-get install mysql-common mysql-server


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值