/usr/local/mysql/mysqld启动不了

来源:4-1 LAMP之安装Mysql

妹妹不要哭

2016-10-25 14:07

root@localhost ~]# /usr/local/mysql/mysqld

-bash: /usr/local/mysql/mysqld: 没有那个文件或目录

[root@localhost ~]# /usr/local/mysql/bin/mysqld

mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file or directory)

2016-10-25T13:40:17.633868Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2016-10-25T13:40:17.634141Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2016-10-25T13:40:17.634224Z 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.16) starting as process 23810 ...

2016-10-25T13:40:17.645214Z 0 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test

2016-10-25T13:40:17.645246Z 0 [Warning] Can't create test file /var/lib/mysql/localhost.lower-test

2016-10-25T13:40:17.645321Z 0 [ERROR] failed to set datadir to /var/lib/mysql/

2016-10-25T13:40:17.645339Z 0 [ERROR] Aborting


2016-10-25T13:40:17.645380Z 0 [Note] Binlog end

2016-10-25T13:40:17.645637Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete


写回答 关注

1回答

  • Lane
    2016-11-01 18:16:30

    一、


    root@localhost ~]# /usr/local/mysql/mysqld

    -bash: /usr/local/mysql/mysqld: 没有那个文件或目录


    这个就是命令没找到了


    二、


    [root@localhost ~]# /usr/local/mysql/bin/mysqld

    mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file or directory)


    这个'/var/lib/mysql/'目录不存在。你可以手动建立,然后再次启动mysqld。如提示权限问题可以使用sudo

PHP环境LAMP/LNMP安装与配置

本课程适于PHP初学者,手把手教你LAMP/LNMP环境安装配置

45275 学习 · 224 问题

查看课程

相似问题