/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


写回答 关注

2回答

  • 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

  • 我不是一个人9595
    2016-10-25 16:42:33

    经过两天的安装终于完成了,首先我试过这种cmake编译安装,编译时间太长高达几十分钟,最后内存直接崩掉(我是笔记本上的虚拟机资源很少)出现很多问题,各种包的安装还有包的版本兼容问题,最后放弃这个种安装方式,选用了不用编译安装的包就是二进制的包,安装过程简单下载解压后直接可以配置具体流程这个网址http://www.jb51.net/article/87160.htm?pc   我解决了 摸摸哒!

PHP环境LAMP/LNMP安装与配置

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

45306 学习 · 224 问题

查看课程

相似问题