0

我在 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é

有人可以帮忙吗

4

1 回答 1

1

使用命令“mysql”,您要做的是启动 mysql 客户端。Mysql 客户端必须连接到服务器。您应该像 Jeremy 建议的那样启动 mysql 服务器,或者使用

sudo start mysql

浏览此处获取更多信息

https://askubuntu.com/questions/125686/mysql-fails-to-start-after-upgrade-to-12-04

于 2012-11-22T13:17:12.670 回答