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

  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist
  • How to Install Any OS on a Physical Drive from Windows Using VMware Workstation (Linux, Windows, BSD)
  • CDN Cloudflare how to set and preserve the real IP of the client without modifying application code on Apache
  • CentOS 7 fix Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was 14: curl#6 -
  • Ubuntu Debian How To Install Recommended Packages Automatically
  • How to set Linux Ubuntu Redhat Debian Command Line http https socks proxy for yum apt