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

  • How high can a Xeon CPU get?
  • bash fix PATH environment variable "command not found" solution
  • Ubuntu Linux Mint Debian Redhat Youtube Cannot Play HD or 4K videos, dropped frames or high CPU usage with Nvidia or AMD Driver
  • hostapd example configuration for high speed AC on 5GHz using WPA2
  • hostapd how to enable and use WPS to connect wireless devices like printers
  • Dell Server Workstation iDRAC Dead after Firmware Update Solution R720, R320, R730
  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint