[ERROR] InnoDB: /opt/lampp/var/data/ibdata1 can't be opened in read-write mode

恢复后修改文件夹权限:

chown -R mysql.mysql data

备份恢复后启动数据库

/opt/lampp/sbin/mysqld --defaults-file=/opt/lampp/etc/my.cnf --user=root &


2018-04-16 17:32:31 140001994162432 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-04-16 17:32:31 140001994162432 [Note] InnoDB: The InnoDB memory heap is disabled
2018-04-16 17:32:31 140001994162432 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-04-16 17:32:31 140001994162432 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2018-04-16 17:32:31 140001994162432 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-04-16 17:32:31 140001994162432 [Note] InnoDB: Using SSE crc32 instructions
2018-04-16 17:32:31 140001994162432 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2018-04-16 17:32:31 140001994162432 [Note] InnoDB: Completed initialization of buffer pool
2018-04-16 17:32:31 140001994162432 [ERROR] InnoDB: /opt/lampp/var/data/ibdata1 can't be opened in read-write mode
2018-04-16 17:32:31 140001994162432 [ERROR] InnoDB: The system tablespace must be writable!
2018-04-16 17:32:31 140001994162432 [ERROR] Plugin 'InnoDB' init function returned error.
2018-04-16 17:32:31 140001994162432 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-04-16 17:32:31 140001994162432 [Note] Plugin 'FEEDBACK' is disabled.
2018-04-16 17:32:31 140001994162432 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2018-04-16 17:32:31 140001994162432 [ERROR] Unknown/unsupported storage engine: InnoDB

2018-04-16 17:32:31 140001994162432 [ERROR] Aborting

按照网上的办法:删除rm -rf ib_logfile*

依然起不来

查看了一下文件权限:

[root@localhost data]# ls -lrt
total 75824
-rw-r-----. 1 root  root  77594624 Apr 16 17:07 ibdata1
drwx------. 2 root  root      4096 Apr 16 17:07 sakila
drwx------. 2 root  root      4096 Apr 16 17:07 mysql
-rw-r-----. 1 root  root       481 Apr 16 17:07 xtrabackup_info
drwx------. 2 root  root      4096 Apr 16 17:07 phpmyadmin
drwx------. 2 root  root      4096 Apr 16 17:07 test
drwx------. 2 root  root      4096 Apr 16 17:07 performance_schema
drwx------. 2 root  root      4096 Apr 16 17:07 userdb
-rw-rw----. 1 mysql mysql        0 Apr 16 17:18 mysql-bin.index
-rw-rw----. 1 mysql mysql       52 Apr 16 17:32 aria_log_control

-rw-rw----. 1 mysql mysql    16384 Apr 16 17:32 aria_log.00000001

修改文件权限,解决

[root@localhost data]# chown -R mysql.mysql ./*


启动mysql命令:

/opt/lampp/sbin/mysqld --defaults-file=/opt/lampp/etc/my.cnf --user=root &

/bin/sh /opt/lampp/bin/mysqld_safe  --defaults-file=/opt/lampp/etc/my.cnf --user=root &

停止mysql命令:

[root@localhost data]# mysqladmin -u root -p shutdown
Enter password: 
2018-04-16 17:46:22 140285376654080 [Note] /opt/lampp/sbin/mysqld: Normal shutdown


2018-04-16 17:46:22 140285376654080 [Note] Event Scheduler: Purging the queue. 0 events
2018-04-16 17:46:22 140285082322688 [Note] InnoDB: FTS optimize thread exiting.
2018-04-16 17:46:22 140285376654080 [Note] InnoDB: Starting shutdown...
2018-04-16 17:46:23 140285376654080 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2018-04-16 17:46:24 140285376654080 [Note] InnoDB: Shutdown completed; log sequence number 42196502

2018-04-16 17:46:24 140285376654080 [Note] /opt/lampp/sbin/mysqld: Shutdown complete



[1]+  Done                    /opt/lampp/sbin/mysqld --defaults-file=/opt/lampp/etc/my.cnf --user=root


登陆命令:

[root@localhost data]# /opt/lampp/bin/mysql -uroot -p
Enter password: 


阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jing_flower/article/details/79963757
文章标签: mysql
个人分类: mysql
上一篇mysql配置文件
下一篇ERROR 1665 (HY000) /binlog简介
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭