---
title: "mysql之安装启动问题"
author: "jahu"
date: "2017-03-24T15:31:55Z"
tags: []
categories: ["数据库"]
slug: "mysql"
draft: false
lastmod: "2017-04-22T15:56:22Z"
id: 2365410
url: "https://jahu.iteye.com/blog/2365410"
---

异常一

         mysqld: \[ERROR] Found option without preceding group in config file /etc/my.cnf at line 1!  
         mysqld: \[ERROR] Fatal error in defaults handling. Program aborted!

 配置文件格式错误，第一行

 异常二

          InnoDB: undo tablespace '/mysql//undo001' exists. Creating system tablespace with existing undo tablespaces is not supported. Please delete all undo tablespaces before creating new system tablespace.  
2017-04-22T15:43:48.168128+08:00 0 \[ERROR] InnoDB: InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.  
2017-04-22T15:43:48.768780+08:00 0 \[ERROR] Plugin 'InnoDB' init function returned error.  
2017-04-22T15:43:48.768850+08:00 0 \[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.  
2017-04-22T15:43:48.768864+08:00 0 \[ERROR] Failed to initialize plugins.  
2017-04-22T15:43:48.768873+08:00 0 \[ERROR] Aborting

 

问题是 undo001文件已经存在。把mysql所有日志一次性全部删除。方便点。

 

问题三

 

2017-04-22T15:43:23.914462+08:00 0 \[ERROR] --initialize specified but the data directory has files in it. Aborting.  
2017-04-22T15:43:23.914514+08:00 0 \[ERROR] Aborting

 

在my.cnf 里面 dataDir配置的目录里面有文件。不让初始化

 

 问题四

执行  ./mysqld --initialize 没效果，只有一个可能，在my.cnf 配置的文件目录没有权限。权限