我这里是关于编译mysql 出现的问题,其中解决办法之一。其他的可以自行百度在优快云里面有很多中解决办法,我这里是记录着我遇到的【我的情况是::初始化没有错误发生,my.cnf 配置文件也没有错误】
我的my.cnf 配置如下:
[mysqld]
user=mysql
port=3306
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
socket=/usr/local/mysql/mysql.sock
pid-file=/usr/local/mysql/data/mysql.pid
tmpdir=/home/tmp
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
skip-federated
[mysqld_safe]
log-error=/usr/local/mysql/mariadb.log
pid-file=usr/local/mysql/mariadb.pid
#log-error=/var/log/mariadb/mariadb.log
#pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
但是启动 就会报错,如下:
报错内容:Starting MySQL.The server quit without updating PID file (/[FAILED]l/mysql/data/ins
我的解决办法是 把解压出来的源 mysql-5.7.27文件 里面的 support-files 移动到 编译好的 mysql/ 目录下。
1.首先是进入到下载解压的mysql目录下,然后执行如下命令
[root@instance-ydx7dnjd mysql-5.7.27]# mv support-files/ /usr/local/mysql/
好了后,就启动mysql服务
[root@instance-ydx7dnjd usr]# service mysqld start
Starting MySQL. [ OK ]
后续我会更详细的补充。mysql 一些编译遇到的问题。大手欢迎评论补充,新手也可以提问。我会每天都回来,看到我会及时的回复您。