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数据库文件存放位置以及解决“start Job failed to start”的问题。 首先,更改MySQL数据文件存放位置的步骤如下: 1. **停止MySQL服务**:在命令行中输入`sudo service mysql stop`...
如果在启动 MySQL 服务时遇到错误提示 `Job for mysqld.service failed. See 'systemctl status mysqld.service' for details.`,可以通过 `systemctl status mysqld.service` 命令查看具体错误信息,并根据错误提示...
例如,在提供的日志中,可以看到“MySQL Daemon failed to start.”和“control process exited, code=exited status=1”,这表明MySQL服务启动时遇到了错误。 2. **检查PID文件**: PID文件通常位于MySQL的数据...
在这个例子中,我们可以看到“MySQL Daemon failed to start”,表明MySQL守护进程启动失败。同时,`journalctl -xe`提供了更详细的日志,帮助我们追踪到更深层次的错误信息。 接下来,我们将按照以下步骤解决MySQL...
这种情况通常会体现在尝试连接MySQL时收到错误提示,比如"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'"或"Job failed to start"。这通常是由于MySQL的数据目录(datadir)或...
如果遇到“job failed to start”或“mysql -tsocket 没连接”的错误,检查是否正确执行了重启命令,或者是否有其他服务冲突。 为了确认字符编码设置是否正确,可以使用以下MySQL命令进行检查: 1. 查看全局字符集...
start_time = job_start_match.group(1) if job_start_match else None job_file = job_start_match.group(2) if job_start_match else None end_time = job_finish_match.group(1) if job_finish_match else ...
<start to="sqoop-action"/> <job-tracker>${jobTracker}</job-tracker> ${nameNode} <name>mapred.job.queue.name <value>default <arg>import <arg>--connect <arg>jdbc:mysql://localhost/...
qname hostname group owner jobname jobnumber account priority qsub_time start_time end_time failed exit_status ru_wallclock ru_utime ru_stime ru_maxrss ru_ixrss ru_ismrss ru_idrss ru_isrss ru_minflt ...
1. **作业调度**:Azkaban允许用户定义作业(Job)和工作流(Workflow),通过时间触发或事件触发来安排作业执行。它可以处理复杂的依赖关系,确保作业按照预设的顺序执行。 2. **Web界面**:Azkaban提供了易于使用...
- 使用符号 `&` 来定义变量,例如: `select * from emp where job = ‘&job’` - 在执行含有变量的命令时,系统会提示用户输入变量值。 **显示和设置环境变量:** - **Linesize:** 设置显示行的宽度,如: `sql> ...