我在Ubuntu 12.04上使用mysql时遇到了一些麻烦。我希望这篇文章在正确的论坛上(如果没有,请告诉我在哪里移动它)
当我运行:sudo /etc/init.d/mysql时,我收到此消息
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
当我运行mysql -u root status时,我得到了这个
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
所以我试图杀死这个过程,所以我运行了ps aux | grep mysql显示这个
1000 3262 0.0 0.0 4388 832 pts/1 S+ 14:05 0:00 grep --color=auto mysqld
当我运行kill命令时,我得到了这个:
kill:没有这样的过程
当我启动sudo mysqld --verbose
时[Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
121122 14:50:24 [ERROR] An old style --language value with language specific part detected: /usr/share/mysql/french/
121122 14:50:24 [ERROR] Use --lc-messages-dir without language specific part instead.
121122 14:50:24 [Note] Plugin 'FEDERATED' is disabled.
121122 14:50:24 InnoDB: The InnoDB memory heap is disabled
121122 14:50:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121122 14:50:24 InnoDB: Compressed tables use zlib 1.2.3.4
121122 14:50:24 InnoDB: Initializing buffer pool, size = 128.0M
121122 14:50:24 InnoDB: Completed initialization of buffer pool
121122 14:50:24 InnoDB: highest supported file format is Barracuda.
121122 14:50:24 InnoDB: Waiting for the background threads to start
121122 14:50:25 InnoDB: 1.1.8 started; log sequence number 2289875
121122 14:50:25 [ERROR] mysqld: unknown variable 'default-character-set=utf8'
121122 14:50:25 [ERROR] Aborting
121122 14:50:25 InnoDB: Starting shutdown...
121122 14:50:26 InnoDB: Shutdown completed; log sequence number 2289875
121122 14:50:26 [Note] mysqld: Arrêt du serveur terminé
有人可以帮忙吗
答案 0 :(得分:1)
使用命令“mysql”,您要做的是启动mysql客户端。 Mysql客户端必须连接到服务器。 您应该像Jeremy建议的那样启动mysql服务器,或者使用
sudo start mysql
请点击此处了解更多信息
https://askubuntu.com/questions/125686/mysql-fails-to-start-after-upgrade-to-12-04