centos7下编译mysql5.7.10完成后启动失败(Starting MySQL ERROR! Couldn't find MySQL server )

phpng 发布于 2016/01/10 00:13
阅读 6K+
收藏 0

编译参数


cmake  -DCMAKE_INSTALL_PREFIX=/usr/local/web_servie/mysql  -DMYSQL_DATADIR=/usr/local/web_servie/mysql/data -DMYSQL_UNIX_ADDR=/usr/local/web_servie/mysql/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/usr/local/web_servie/mysql/data/ -DMYSQL_TCP_PORT=3306 -DWITH_SYSTEMD=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/src/boost_1_59_0/

一些设置

groupadd mysql

useradd -g mysql mysql 

chown -R mysql:mysql /usr/local/web_servie/mysql

rm /etc/my.cnf

初始化命令


/usr/local/web_servie/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/web_servie/mysql --datadir=/usr/local/web_servie/mysql/data

初始化后的输出

2016-01-06T23:14:04.704711Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2016-01-06T23:14:05.100363Z 0 [Warning] InnoDB: New log files created, LSN=45790

2016-01-06T23:14:05.154067Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2016-01-06T23:14:05.214424Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 2e4292f5-b4cb-11e5-a5bf-000c29cdedc7.

2016-01-06T23:14:05.215641Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2016-01-06T23:14:05.216716Z 1 [Note] A temporary password is generated for root@localhost : 9VC/1+rZkwOA

启动mysql


/usr/local/web_servie/mysql/support-files/mysql.server start

结果


Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/web_servie/mysql/bin/mysqld_safe)

尝试修改配置文件


cp /usr/local/web_servie/mysql/support-files/my-default.cnf /etc/my.cnf

编辑配置文件如下

[mysqld]

basedir = /usr/local/web_servie/mysql

datadir = /usr/local/web_servie/mysql/data

port = 3306

server_id = 1

socket = /usr/local/web_servie/mysql/mysql.sock

[mysql.server]

user=mysql

basedir=/usr/local/web_servie/mysql

[client]

port=3306

socket=/usr/local/web_servie/mysql/mysql.sock

再次启用

/usr/local/web_servie/mysql/support-files/mysql.server start

结果

Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/web_servie/mysql/bin/mysqld_safe)

网上的资料千篇一律,自己也试着修改了很多不同的配置,最后都是失败了。  求教。 


加载中
0
百世经纶之傲笑红尘
百世经纶之傲笑红尘
Ubuntu下使用deb包大法很好用。。。然CentOS我没耍过,但猜测和deb版的安装失败一个原因,某个依赖文件或依赖类库之前没安装,,,
phpng
phpng
唉,编译都是正常的。
0
定期马甲
定期马甲

可以先试试

mysqld_safe --defaults-file=

0
Feng_Yu
Feng_Yu

自己作死编译。你就没理解编译的这些参数的作用,以及启动的方式。

你为何不从官方repo安装编译好的软件包?

phpng
phpng
回复 @Feng_Yu : 正因为没有那种基础,只能自己一点点的折腾。我现在去学会英语,有需要花费多少时间成本。按照你的逻辑,需要把原理先要去弄懂,我不应该安装这个,应该先去学习英语,然后再去学习汇编,再去学习C,C++,要是想用mysql的话,除了看官方文档之外,还需要把整套mysql源码读懂理解。 专家您好!shijing shijing
phpng
phpng
回复 @Feng_Yu :今年准备学。问题已经解决了~呵呵
Feng_Yu
Feng_Yu
回复 @phpng : 愿意折腾的前提是——看得懂官方文档。基础都没有就乱搞,能搞出来才是怪事
Feng_Yu
Feng_Yu
回复 @phpng : 你还是先去把英语学好
phpng
phpng
回复 @Feng_Yu : 我不会英语,也没专科出身,但我愿意去折腾,去学习。这样才能有更好的进步。谢谢
下一页
0
zzcv
zzcv
百度下,Linuxeye 他之前有发布一个onestak支持5.7编译安装。
0
zzcv
zzcv
不过时间巨长。
返回顶部
顶部