I got an error while am up starting the mysql service.
/etc/init.d/mysql start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql start
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mysql
start: Job failed to start
First, try to reboot the server (if it doesn't work, follow to the next steps):
sudo reboot
Other steps:
First, create a backup from you MySQL folder var/lib/mysql/, just to make sure your data will be safe:
sudo -i
cp -R /var/lib/mysql/ ~/mysql
After that, remove/purge MySQL (this will remove: php5-mysql, phpmyadmin and other libraries, so after the procedure, you will have to reinstall again.
sudo apt-get purge mysql-server-5.1 mysql-common
Remove the folder /etc/mysql/ and its content:
sudo rm /etc/mysql/ -R
Later on, check if the database files are still in the folder /var/lib/mysql/ and if they are not, then copy it back:
mkdir /var/lib/mysql/
chown root:root /var/lib/mysql/ -R
cd ~/mysql/
cp * /var/lib/mysql/ -R
Okay, then install o mysql server again
apt-get install mysql-server
And finally install phpmyadmin and php5-mysql:
apt-get install php5-mysql
apt-get install phpmyadmin
At last, restart the services and check if the status are okay now:
service apache2 restart
service mysql restart
That's it! It should work. I hope it works for you! (don't worry about the old data.That's why we have backup it first)
mysql报错:
ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50554, now running 50719. Please use mysql_upgrade to fix this error
错误是由于你曾经升级过数据库,升级完后没有使用
mysql_upgrade升级数据结构造成的。
解决办法:
使用mysql_upgrade命令
root@localhost ~]# mysql_upgrade -u root -p 13456
分享到:
相关推荐
MySQL Daemon failed to start错误解决办法 前两天我们发现发布好的网站不可以进行注册,登陆这些活动,但是访问页面是正常的。于是开始对问题进行排查,首先我们重启了jenkins,但是每次重启都有错误,于是我们只能...
如何更改MySQL数据库文件存放位置 解决Can't open the mysql.plugin table.start Job failed to start
进到cli模式下,执行 service myqsld start 发现还是提示”mysql deamon failed to start”错误信息. # /etc/init.d/mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED] 查看mysqld的log文件 #...
网站突然连接不上数据库,于是朋友直接重启了一下服务器。进到cli模式下,执行 service myqsld start 发现还是提示"mysql deamon failed to start"错误信息
解决mysql failed to open table mysql.event
利用zabbix监控mysql,方便好用,不需要在被监控端安装或执行任何脚本
主要介绍了mysql的jdbc的如何使用以及操作~对于需要的童鞋有一定帮助指导作用~
mysql服务启动不了问题解决办法,文档描述,主要因数据文件损坏引起。
数据库表A: CREATE TABLE task_desc_tab ( id INT(11) PRIMARY KEY NOT NULL COMMENT '自增主键' AUTO_INCREMENT, <strong>taskname</strong> VARCHAR(200) NOT NULL COMMENT '任务名字', sqlname VARCHAR(20) ...
mysql的定时job的一个简单应用,采用mysql存储过程的调用方式执行任务。该任务中涉及到使用游标来完成多个update执行过程。
主要给大家介绍了关于MySQL连接抛出Authentication Failed错误的分析与解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
MYSQL安装出现could not start the service mysql error0处理
主要介绍了mysql Event Scheduler: Failed to open table mysql.event,需要的朋友可以参考下
到控制面板里面先把mysql删除. 到c盘C:\Program Files目录下把mysql目录删除. 如果在其他盘还有设置目录也要删除.空目录也要删除 到regedit把注册表 ,全部删除!
lnmp安装(nginx mysql php )
mysql-connecto-java从51.45版本到8.0.20版本的jar mysql-connecto-java从51.45版本到8.0.20版本的jar
Dbmover for Mysql to Oracle 是高效的将Mysql导入到Oracle数据库的工具。 使用DBMover可以灵活定义Mysql和Oracle之间表和字段的对照关系,也可以在DBMover创建一个查询,把查询结果当作源表转入到Oracle中。 ...
Mysql连接工具
mysql的连接问题,重启电脑登录不上mysql的问题