mysql linux安装遇到的问题

1、Can't connect to local MySQL server through socket '/tmp/mysql.sock'

做了个软连接:ln -s /var/lib/mysql/mysql.sock /tmp

2、

[root@lml7wenjian software]# service mysql start
Starting MySQL.2020-01-21T07:46:16.483318Z mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.
ERROR! The server quit without updating PID file (/var/lib/mysql/lml7wenjian.pid).

[root@lml7wenjian lib]# mkdir   /var/lib/mysql
[root@lml7wenjian lib]# chmod 777  /var/lib/mysql
[root@lml7wenjian lib]# service mysql start
Starting MySQL. SUCCESS!

  3、my.cnf 配置:

[mysqld]
datadir=/usr/local/mysql/data
basedir=/usr/local/mysql/
socket=/var/lib/mysql/mysql.sock
user=mysql
port=3306
character-set-server=utf8
# remove password auth
#skip-grant-tables
# 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

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

  

 找文件时遇到的问题,

yum -y install numactl

再试试这个

yum install libaio

猜你喜欢

转载自www.cnblogs.com/hoge66/p/12222259.html