MySQL NEVER delete ib_logfile0 or ibdata1 or you'll lose data

don't delete /var/lib/mysql/ib_logfile0 or ibdata1 or mysql won't restart
I didn't realize they were internal and not part of replication like the relay files!


/usr/libexec/mysqld: ready for connections.
Version: '4.1.22-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
110127 16:31:00 [Note] /usr/libexec/mysqld: Normal shutdown

110127 16:31:00  InnoDB: Starting shutdown...
110127 16:31:01  InnoDB: Shutdown completed; log sequence number 0 1392990560
110127 16:31:01 [Note] /usr/libexec/mysqld: Shutdown complete

InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
110127 16:31:02  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
110127 16:31:02  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
110127 16:31:02  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Cannot create doublewrite buffer: you must
InnoDB: increase your buffer pool size.
InnoDB: Cannot continue operation.
110127 16:31:59  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...
110127 16:31:59  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 30960.
InnoDB: Doing recovery: scanned up to log sequence number 0 30960
110127 16:32:00  InnoDB: Flushing modified pages from the buffer pool...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Cannot create doublewrite buffer: you must
InnoDB: increase your buffer pool size.
InnoDB: Cannot continue operation.
110127 16:32:45  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...
110127 16:32:45  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 30960.
InnoDB: Doing recovery: scanned up to log sequence number 0 30960
110127 16:32:45  InnoDB: Flushing modified pages from the buffer pool...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Cannot create doublewrite buffer: you must
InnoDB: increase your buffer pool size.
InnoDB: Cannot continue operation.

/etc/my.cnf
set-variable = innodb_buffer_pool_size=50M

service mysqld start

service mysqld start
Starting MySQL:                                            [  OK  ]


110127 17:40:56  InnoDB error:
Cannot find table psa/misc from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
Look from section 15.1 of http://www.innodb.com/ibman.html
how you can resolve the problem.


service psa restart
ERROR 1030 (HY000) at line 1: Got error 1 from storage engine


110127 17:42:46  InnoDB error:
Cannot find table psa/key_history from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
Look from section 15.1 of http://www.innodb.com/ibman.html
how you can resolve the problem.

The only way I could fix it was to rm -rf /var/lib/mysql/psa and dump a backup of the psa database I had
 


Tags:

mysql, delete, ib_logfile, ibdata, ll, datadon, var, lib, restart, didn, replication, relay, usr, libexec, mysqld, connections, socket, shutdown, innodb, completed, sequence, specified, database, mb, writes, doublewrite, buffer, creating, tablespace, ibd, restoring, scan, checkpoint, scanned, flushing, modified, etc, cnf, variable, innodb_buffer_pool_size, ok, psa, misc, dictionary, frm, deleted, recreated, corresponding, http, www, ibman, html, resolve, hy, key_history, rm, rf,

Latest Articles

  • Linux Ubuntu Cannot Print Large Images
  • Cannot Print PDF Solution and Howto Resize
  • Linux Console Login Screen TTY Change Message
  • Apache Cannot Start Listening Already on 0.0.0.0
  • MySQL Bash Query to pipe input directly without using heredoc trick
  • CentOS 6 and 7 / RHEL Persistent DHCP Solution
  • Debian Ubuntu Mint rc-local service startup error solution rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format error
  • MySQL Cheatsheet Guide and Tutorial
  • bash script kill whois or other command that is running for too long
  • Linux tftp listens on all interfaces and IPs by DEFAULT Security Risk Hole Solution
  • python import docx error
  • Cisco Unified Communications Manager Express Cheatsheet CUCME CME
  • Linux Ubuntu Debian Missing privilege separation directory: /var/run/sshd
  • bash how to count the number of columns or words in a line
  • bash if statement how to test program output without assigning to variable
  • RTNETLINK answers: Network is unreachable
  • Centos 7 how to save iptables rules like Centos 6
  • nfs tuning maximum amount of connections
  • qemu-kvm error "Could not initialize SDL(No available video device) - exiting"
  • Centos 7 tftpd will not work with selinux enabled