CentOS에 MySQL 5.7을 설치하고 서비스를 시작하려고 했지만 이 오류가 발생했습니다.
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
mysqld.log
포함
2016-05-19T06:49:42.595371Z mysqld_safe Starting mysqld daemon with databases fr om /var/lib/mysql
2016-05-19T06:49:42.726232Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see doc umentation for more details).
2016-05-19T06:49:42.726437Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.12) starting a s process 6511 ...
2016-05-19T06:49:42.729712Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-05-19T06:49:42.729734Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-05-19T06:49:42.729740Z 0 [Note] InnoDB: Uses event mutexes
2016-05-19T06:49:42.729746Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2016-05-19T06:49:42.729752Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-05-19T06:49:42.729759Z 0 [Note] InnoDB: Using Linux native AIO
2016-05-19T06:49:42.729980Z 0 [Note] InnoDB: Number of pools: 1
2016-05-19T06:49:42.730080Z 0 [Note] InnoDB: Using CPU crc32 instructions
2016-05-19T06:49:42.736659Z 0 [Note] InnoDB: Initializing buffer pool, total siz e = 128M, instances = 1, chunk size = 128M
2016-05-19T06:49:42.744976Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-05-19T06:49:42.746579Z 0 [Note] InnoDB: If the mysqld execution user is aut horized, page cleaner thread priority can be changed. See the man page of setpri ority().
2016-05-19T06:49:42.758283Z 0 [Note] InnoDB: Highest supported file format is Ba rracuda.
2016-05-19T06:49:42.773498Z 0 [Note] InnoDB: Creating shared tablespace for temp orary tables
2016-05-19T06:49:42.773597Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-05-19T06:49:42.868794Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-05-19T06:49:42.869616Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-05-19T06:49:42.869630Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-05-19T06:49:42.870091Z 0 [Note] InnoDB: Waiting for purge to start
2016-05-19T06:49:42.920263Z 0 [Note] InnoDB: 5.7.12 started; log sequence number 47501023
2016-05-19T06:49:42.920461Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-05-19T06:49:42.920730Z 0 [Warning] System table 'plugin' is expected to be transactional.
2016-05-19T06:49:42.921136Z 0 [Warning] Gtid table is not ready to be used. Tabl e 'mysql.gtid_executed' cannot be opened.
2016-05-19T06:49:42.921212Z 0 [Warning] Failed to set up SSL because of the foll owing SSL library error: SSL context is not usable without certificate and priva te key
2016-05-19T06:49:42.921371Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2016-05-19T06:49:42.921426Z 0 [Note] IPv6 is available.
2016-05-19T06:49:42.921438Z 0 [Note] - '::' resolves to '::';
2016-05-19T06:49:42.921446Z 0 [Note] Server socket created on IP: '::'.
2016-05-19T06:49:42.921635Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/li b/mysql/ib_buffer_pool
2016-05-19T06:49:42.921792Z 0 [Note] InnoDB: Buffer pool(s) load completed at 16 0519 12:19:42
2016-05-19T06:49:42.923348Z 0 [Warning] Failed to open optimizer cost constant t ables
2016-05-19T06:49:42.923623Z 0 [ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.
2016-05-19T06:49:42.923679Z 0 [ERROR] Aborting
2016-05-19T06:49:42.923691Z 0 [Note] Binlog end
2016-05-19T06:49:42.923731Z 0 [Note] Shutting down plugin 'ngram'
2016-05-19T06:49:42.923741Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2016-05-19T06:49:42.923746Z 0 [Note] Shutting down plugin 'ARCHIVE'
2016-05-19T06:49:42.923750Z 0 [Note] Shutting down plugin 'partition'
2016-05-19T06:49:42.923754Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2016-05-19T06:49:42.923815Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2016-05-19T06:49:42.923822Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2016-05-19T06:49:42.923826Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACE S'
2016-05-19T06:49:42.923829Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_CO LS'
2016-05-19T06:49:42.923833Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2016-05-19T06:49:42.923841Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2016-05-19T06:49:42.923844Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2016-05-19T06:49:42.923848Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2016-05-19T06:49:42.923851Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS '
2016-05-19T06:49:42.923855Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2016-05-19T06:49:42.923858Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE '
2016-05-19T06:49:42.923862Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE '
2016-05-19T06:49:42.923865Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2016-05-19T06:49:42.923870Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELET ED'
2016-05-19T06:49:42.923873Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2016-05-19T06:49:42.923877Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STO PWORD'
2016-05-19T06:49:42.923880Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2016-05-19T06:49:42.923883Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INF O'
2016-05-19T06:49:42.923887Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_ST ATS'
2016-05-19T06:49:42.923890Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LR U'
2016-05-19T06:49:42.923893Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2016-05-19T06:49:42.923897Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_ RESET'
2016-05-19T06:49:42.923900Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2016-05-19T06:49:42.923903Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2016-05-19T06:49:42.923907Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2016-05-19T06:49:42.923910Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2016-05-19T06:49:42.923913Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2016-05-19T06:49:42.923917Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2016-05-19T06:49:42.923920Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2016-05-19T06:49:42.923923Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2016-05-19T06:49:42.923927Z 0 [Note] Shutting down plugin 'InnoDB'
2016-05-19T06:49:42.923971Z 0 [Note] InnoDB: FTS optimize thread exiting.
2016-05-19T06:49:42.924055Z 0 [Note] InnoDB: Starting shutdown...
2016-05-19T06:49:43.024521Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/ mysql/ib_buffer_pool
2016-05-19T06:49:43.024711Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 16 0519 12:19:43
2016-05-19T06:49:44.541254Z 0 [Note] InnoDB: Shutdown completed; log sequence nu mber 47501042
2016-05-19T06:49:44.542642Z 0 [Note] InnoDB: Removed temporary tablespace data f ile: "ibtmp1"
2016-05-19T06:49:44.542655Z 0 [Note] Shutting down plugin 'CSV'
2016-05-19T06:49:44.542666Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2016-05-19T06:49:44.542671Z 0 [Note] Shutting down plugin 'MyISAM'
2016-05-19T06:49:44.542687Z 0 [Note] Shutting down plugin 'MEMORY'
2016-05-19T06:49:44.542697Z 0 [Note] Shutting down plugin 'sha256_password'
2016-05-19T06:49:44.542702Z 0 [Note] Shutting down plugin 'mysql_native_password '
2016-05-19T06:49:44.542816Z 0 [Note] Shutting down plugin 'binlog'
2016-05-19T06:49:44.542996Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
2016-05-19T06:49:44.549488Z mysqld_safe mysqld from pid file /var/run/mysqld/mys qld.pid ended
df -hT
제공 :
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_livecd-lv_root ext4 6.7G 5.4G 1.2G 83% /
tmpfs tmpfs 435M 68K 435M 1% /dev/shm
/dev/sda1 ext4 485M 40M 420M 9% /boot
답변1
MySQL의 로그는 문제를 매우 명확하게 알려줍니다.
CentOS에 MySQL 5.7을 설치했습니다 [...]
2016-05-19T06:49:42.923623Z 0 [ERROR] 치명적인 오류: mysql.user 테이블이 손상되었습니다. mysql_upgrade를 실행해주세요. 2016-05-19T06:49:42.923679Z 0 [오류] 중단 중
MySQL을 설치하지 않았습니다. 너기존 업그레이드데이터베이스 스키마를 버전 5.7에 필요한 버전으로 업그레이드하지 않고 MySQL을 설치합니다.
그리고 이 사람들처럼...
... 당신은 MySQL이 당신의 데이터베이스를 좋아하지 않을 것이고 당신이 그것을 새로운 스키마로 업그레이드할 때까지 그 데이터베이스로 시작하는 것을 거부할 것이라는 것을 알게 됩니다.
비탈리유스 리자코바스 라고설치 유틸리티를 사용하여 전체 데이터베이스를 다시 설치하면 이전 데이터가 모두 손실됩니다.
레인들 하랄드 라고장차 ~ 가 되는CentOS 저장소에 주의하세요. Xe는 오라클의 조언을 반영합니다.한 번에 하나의 릴리스 레벨만 업그레이드하십시오..
M. Harald 저장소가 말한 사람은,레미 콜레는 이렇게 말했습니다.한 번 더 이전 버전의 MySQL로 다운그레이드하려면 전체 데이터베이스 세트를 파일로 덤프하고 다시 한 번 업그레이드한 후 덤프에서 복원하면 됩니다.
Oracle은 doco에서 업그레이드 및 덤프-복원 방법을 모두 설명합니다.내부 업그레이드그리고 후자는논리적 업그레이드.
추가 읽기
- MySQL 업그레이드. MySQL 참조 매뉴얼. 5.7. 오라클 법인.
mysql_upgrade
. MySQL 참조 매뉴얼. 5.7. 오라클 법인.mysqldump
. MySQL 참조 매뉴얼. 5.7. 오라클 법인.
답변2
장치에 남은 공간이 없습니다
파티션에 inode가 부족함을 의미할 수도 있습니다. inode 사용량을 확인하는 데 사용됩니다 df -i
.
inode가 부족해지는 것은 드문 일이므로, 여러분이 인식하지 못하는 어딘가에 작거나 길이가 0인 파일로 가득 찬 디렉터리가 있을 수 있습니다. 불행하게도 저는 이런 종류의 것을 찾는 쉬운 방법을 모릅니다. 실행하면 find / -xdev
파티션에 있는 모든 파일과 디렉터리의 이름이 인쇄됩니다. 빈 파일로 가득 찬 의심스러운 디렉터리를 발견할 수도 있습니다.
나는 수백만 개의 inode를 사용했을 때 한 번 시도했습니다.
찾다 . -유형 f -이름 sess_* -삭제
업데이트
다음 단계를 시도해 보세요.
mysqld_safe –skip-grant-tables –user=root &
mysql_fix_privilege_tables
pkill mysqld
/etc/init.d/mysqld restart
답변3
chown mysql:mysql /var/lib/mysql
chmod 700 /var/lib/mysql
chkconfig --level 345 mysql on
service mysqld start