본문 바로가기
MySql

MySQL 오류 파일

by 베이스 공부 2020. 12. 12.
반응형

이 문제를 어떻게 해결합니까?

Chown? chown: changing ownership of /var/lib/mysql/ibdata1': Operation not permitted chown: changing ownership of/var/lib/mysql/denora': Operation not permitted chown: changing ownership of /var/lib/mysql/anope': Operation not permitted chown: changing ownership of/var/lib/mysql/test': Operation not permitted chown: changing ownership of /var/lib/mysql/Animachat.svipchat.org.err': Operation not permitted chown: changing ownership of/var/lib/mysql/vpsgabriel.svipchat.org.err': Operation not permitted chown: changing ownership of /var/lib/mysql/ib_logfile1': Operation not permitted chown: changing ownership of/var/lib/mysql/mysql': Operation not permitted chown: changing ownership of /var/lib/mysql/wp': Operation not permitted chown : 소유권 변경 / var / lib / mysql / ib_logfile0 ': 작업이 허용되지 않습니다.

MysqlD 시작?

[root @ SSH mysql] # sudo /etc/init.d/mysqld restart Stopping mysqld: [ OK ] MySQL Daemon failed to start. mysqld 시작 : [실패]

MySQLd 로그 :

140129 09:39:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140129  9:39:37 [Warning] '--safe-show-database' is deprecated and will be removed in a future release. Please use 'GRANT SHOW DATABASES' instead.
140129  9:39:37  InnoDB: Initializing buffer pool, size = 8.0M
140129  9:39:37  InnoDB: Completed initialization of buffer pool
140129  9:39:37  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
140129 09:39:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140129 09:40:05 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140129  9:40:05 [Warning] '--safe-show-database' is deprecated and will be removed in a future release. Please use 'GRANT SHOW DATABASES' instead.
140129  9:40:05  InnoDB: Initializing buffer pool, size = 8.0M
140129  9:40:05  InnoDB: Completed initialization of buffer pool
140129  9:40:05  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
140129 09:40:05 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140129 09:42:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140129  9:42:02 [Warning] '--safe-show-database' is deprecated and will be removed in a future release. Please use 'GRANT SHOW DATABASES' instead.
140129  9:42:02  InnoDB: Initializing buffer pool, size = 8.0M
140129  9:42:02  InnoDB: Completed initialization of buffer pool
140129  9:42:02  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
140129 09:42:02 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140129 09:44:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140129  9:44:55 [Warning] '--safe-show-database' is deprecated and will be removed in a future release. Please use 'GRANT SHOW DATABASES' instead.
140129  9:44:55  InnoDB: Initializing buffer pool, size = 8.0M
140129  9:44:55  InnoDB: Completed initialization of buffer pool
140129  9:44:55  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
140129 09:44:55 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

 

해결 방법

 

MySQL 데몬을 실행하는 사용자는 데이터베이스 디렉토리에 쓸 권한이 없습니다.

기본 설정으로 표준 설치를 사용하는 경우 다음 명령으로이를 수정해야합니다 ( 편집 된 출력에 따라 sudo를 추가하도록 편집 됨 : root 로 실행할 수있는 경우 < code> sudo ) :

sudo chown -R mysql:mysql /var/lib/mysql

/etc/my.cnf 에서 user = 옵션을 찾아서 정확히 어떤 사용자인지 ( mysql 이 아닌 경우) 찾을 수 있습니다. 또는 /etc/mysql/my.cnf .

 

참조 페이지 https://stackoverflow.com/questions/21434984

 

 

반응형

댓글