2

我按照这个链接升级我的mysql,https://rtcamp.com/tutorials/mysql/mysql-5-6-ubuntu-12-04/

文章ubuntu是x64,但是我的ubuntu是x32,所以我把下载链接改成http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.16-debian6.0-i686.deb

当我完成安装时,当我键入以下命令启动 mysql 时:$ service mysql.server start

它提醒我:

Starting MySQL
. * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

当我尝试打字service mysql-server restart时,它提醒我有点恭敬:

 * MySQL server PID file could not be found!
Starting MySQL
. * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).

有一些东西可能会有所帮助:

  • my.cnf 位于 /etc/mysql/my.cnf
  • ps aux | grep mysqlps aux | grep mysql再次输入时会显示不同的PID

my.cnf 文件有以下行

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket      = /var/run/mysqld/mysqld.sock
nice        = 0
4

2 回答 2

1

在文件夹“/var/run/mysqld/”中创建一个名为“mysqld.pid”的新文件,然后编辑该文件,例如将第 1 行设置为:1329,然后再次启动服务器

于 2015-03-09T10:03:19.550 回答
0

通过命令 rm -f 'filename.pid' 删除所有现有的 pid 文件

然后启动服务器..

谢谢

于 2014-04-11T07:19:35.187 回答