Mysql更换成MariaDB后,不能启动的问题

分类: 工作记录 0人评论 selfly 1年前发布

对sql语句进行优化后,因为Mysql 5.1的版本太低发挥不出它的性能,故升级成MariaDB 5.5(msyql的一个分支),但升级之后居然无法启动。

刚开始提示是不能以root用户直接启动,这个好解决,指定用户或者直接以--user=root参数强制启动即可。

但随后报出来以下错误:

mysqld: Too many arguments (first extra is 'started').
101116 15:01:51 [ERROR] Aborting 
101116 15:01:51  InnoDB: Starting shutdown...
101116 15:01:52  InnoDB: Shutdown completed; log sequence number 7 1210783078
101116 15:01:52 [Note] mysqld: Shutdown complete

不明所以,完全没有具体的错误信息,看提示大致是参数错了,但我才刚装完啥都没改过,怎么会多出来参数?

用安全模式启动,

./mysqld_safe &

一样的错误,但是多出一点信息,有个日志文件输出在 /var/lib/mysql/AY140303093130432ccbZ.err

打开该日志文件,看到有如下信息:

140929 13:59:58 mysqld_safe mysqld from pid file /var/lib/mysql/AY140303093130432ccbZ.pid ended
140929 14:00:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140929 14:00:46 InnoDB: The InnoDB memory heap is disabled
140929 14:00:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140929 14:00:46 InnoDB: Compressed tables use zlib 1.2.3
140929 14:00:46 InnoDB: Using Linux native AIO
140929 14:00:46 InnoDB: Initializing buffer pool, size = 128.0M
140929 14:00:46 InnoDB: Completed initialization of buffer pool
140929 14:00:46 InnoDB: highest supported file format is Barracuda.
140929 14:00:46  InnoDB: Waiting for the background threads to start
140929 14:00:47 Percona XtraDB (http://www.percona.com) 5.5.38-MariaDB-35.2 started; log sequence number 1597945
140929 14:00:47 [Note] Plugin 'FEEDBACK' is disabled.
140929 14:00:47 [Note] Server socket created on IP: '0.0.0.0'.
140929 14:00:47 [Note] Event Scheduler: Loaded 0 events
140929 14:00:47 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.39-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
140929 14:03:52 [Note] /usr/sbin/mysqld: Normal shutdown
140929 14:03:52 [Note] Event Scheduler: Purging the queue. 0 events
140929 14:03:52  InnoDB: Starting shutdown...
140929 14:03:53  InnoDB: Shutdown completed; log sequence number 1597945
140929 14:03:53 [Note] /usr/sbin/mysqld: Shutdown complete

其中一行 140929 14:00:46 InnoDB: highest supported file format is Barracuda. 

看样子是数据文件的格式不同,不支持啊,幸好之前备份了sql文件,

将目录下的数据文件删除重新建立(或者直接删除后重装),再启动MariaDB,终于正常了

接着把sql数据导入,收工!

上一篇:
下一篇:

你可能感兴趣的文章

0 条评论