更改 MYSQL 数据目录时出错

更改 MYSQL 数据目录时出错

我试图按照这些更改 mysql 数据目录指示。当我尝试使用步骤 8 重新启动数据库时:

sudo /etc/init.d/mysql restart

得到以下错误:

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
start: Job failed to start

当我尝试使用以下命令启动数据库时:

service mysql start

我收到以下错误消息:

start: Rejected send message, 1 matched rules; type="method_call", sender=":1.71" (uid=1000 pid=3703 comm="start mysql ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

尝试后sudo mysql start我得到Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

相关内容