3일동안 안보기

MariaDB

[MYSQL] 구동 시 Active: failed (Result: exit-code) 해결법

페이지 정보

profile_image
작성자 최고관리자
댓글 0건 조회 22,715회 작성일 25-01-07 17:48

본문

서버 업데이트 후 재부팅하는 과정에서 Mysql이 구동되지 않았다.


$ service mysql status


명령어를 통해 상태를 확인해보니 아래와 같았다.

 

● mysql.service - LSB: Start and stop the mysql database server daemon           

  Loaded: loaded (/etc/init.d/mysql)                                                            

  Active: failed (Result: exit-code) since Thu 2018-02-22 08:28:48 KST; 7s ago       

  Process: 2693 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)

  Process: 2761 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE) 


mysql error log를 확인해 보자.


$ cd /var/log/mysql

$ vi error.log         


맨 아래에 보니 다음과 같은 에러가 있었다.


mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Incorrect file format 'plugin'
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: Initializing buffer pool, size = 8.0M
InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Started; log sequence number 0 2248162432
[ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format 'host'

구글링을 통해 다음과 같이 해결했다.


1. MySQL config 파일을 수정한다. 경로는

CentOS/RHEL/CloudLinux  : /etc/my.cnf 
Ubuntu/Debian               :/etc/mysql/my.cnf


파일을 열면 [mysqld] section에서 skip-grant-tables 를 추가한다.

ex.


[mysqld]

#

# * Basic Settings

#

user            = mysql

port            = 3306

...

skip-grant-tables

 


2. Mysql 을 재시작한다.

$ service mysql restart

추천0 비추천0

댓글목록

등록된 댓글이 없습니다.

회원 로그인

포인트랭킹

1 밤통령 320,000점
2 불꽃남자 70,000점
3 보라돌이 47,000점
4 제로나인 33,000점
5 소프리 7,800점
6 딸기케이크 6,000점
7 딸기케이크 6,000점
8 그해우리는 6,000점

포인트랭킹

1 밤통령 320,000점
2 불꽃남자 70,000점
3 보라돌이 47,000점
4 제로나인 33,000점
5 소프리 7,800점
6 딸기케이크 6,000점
7 딸기케이크 6,000점
8 그해우리는 6,000점

검색랭킹

1 2023 new
2 우분투 1
3
4
5
6
7
8
9
10

자유게시판

  • 게시물이 없습니다.

자유게시판

게시물이 없습니다.

접속자집계

오늘
83
어제
121
최대
2,047
전체
133,772