
다음 명령을 사용하여 이미 서버(Centos 7)에 MySQL을 설치했습니다.
yum install -y mysql
yum install -y mysql-server
yum install -y mysql-devel
설치 후 입력했는데 mysql
오류가 발생했습니다.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/mysql/mysql.sock' (2)
아직 MySQL 서비스를 시작하지 않았기 때문인 것 같아서 다음과 같이 명령어를 입력합니다.
service mysqld start
그러다가 그런 메시지를 받았어요Job for mariadb.service failed
내용은 다음과 같습니다/etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
그러나 해당 파일이 /var/lib/mysql/mysql.sock
내 서버에 존재하지 않습니다. 그런데 SELINUX는 수동으로 비활성화됩니다.
mariadb.log
쇼
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
InnoDB: Possible causes for this error:
(a) Incorrect log file is used or log file size is changed
(b) In case default size is used this log file is from 10.0
(c) Log file is corrupted or there was not enough disk space
In case (b) you need to set innodb_log_file_size = 48M
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGIN failed.
[ERROR] Unknown/unsupported storage engine: innodb
[ERROR] Aborting
답변1
이 문제는 해결되었으므로 직접 답변해 드리고 싶습니다. 이러한 자가 응답 동작이 적절하지 않은 경우 아래에 의견을 남겨주세요.
/var/log/mariadb/maridb.log
전반적으로 파일 에 나열된 문제를 파악하여 이 문제를 해결합니다 .
먼저 ./ib_logfile0
파일 내에서 크기 제한 이상으로 지적되어 있는 를 제거합니다 log
. 그런 다음 으로 enable
+ start
mariadb를 시도하고 systemctl
다시 실패합니다. maridb.log
말한다 Incorrect information in file './mysql/proxies_priv.frm'
. 잘못된 파일을 백업하고 mysql을 다시 시작하면 mardb가 마침내 정상이 됩니다.