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

  • ImageMagick Convert PDF Not Authorized
  • ImageMagick Converted PDF to JPEG some files have a black background solution
  • Linux Mint Mate Customize the Lock screen messages and hide username and real name
  • Ubuntu/Gnome/Mint/Centos How To Take a partial screenshot
  • ssh how to verify your host key / avoid MIM attacks
  • Cisco IP Phone CP-8845 8800/8900 Series How To Reset To Factory Settings Instructions
  • ls how to list ONLY directories
  • How to encrypt your SSH private key file id_rsa
  • Linux Mint 18 Disable User Name List from showing on Login Screen
  • Firefox Cannot Hit Enter Key In Address Bar and Location History Not Working
  • Cisco Unified Communications Manager / CUCM IP 8.6,10,12 Install Error Solution
  • Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution
  • nmap how to scan for all ports and not just the 1000 most common ports
  • Windows 7,8,10 and Server 2008, 2012, 2016, 2019 Read Only Attribute Won't Go Away
  • bind / named how to make a wildcard record and retain defined A records
  • Cisco Unified Communications Manager 12 Install Errors on Proxmox/KVM
  • Local Vs Universally Administered MAC Address NIC Refuses to come up
  • Cisco Unified Communications Manager 12 CUCM 12 - How To Enable Video Calling
  • Windows 7, 8, 10, Windows Server 2008, 2012, 2016, 2019 How To AC97 Audio Drivers and Other Unsigned Drivers
  • Cisco Unified Communications Manager / CUCM IP Telephony Definitions