08.16
Mysql Innodb configuration
By Satish Natarajan
If you want all the tables to be InnoDB add this line to your /etc/my.cnf file
‘default-storage-engine=innodb’
Findings, Tips & Tricks
If you want all the tables to be InnoDB add this line to your /etc/my.cnf file
‘default-storage-engine=innodb’
HAPPY SYNC’ ing.
NOTE: Very important if you do Rsync or db replication – you will save yourself lot of heartache
Well if you are like most of the system admins – you would want to run your db as it is own user. If you are one of the folks who was forced to run the mysql_install_db script, please please user the –user mysql ( I am assuming you will be using mysql as the user name).
If you do not use it and ran it already do this ‘chown -R mysql.mysql /var/lib/mysql’
I just ran into this issue where one of our customers was setting up a fresh innodb engine database whose ibdata file was 2 GB.
The startup script when run the first time will try to create the database. The setup script will time out because it takes a long time. BUT WAIT….
if you run the command ‘ps -ef | grep mysql’ OR ‘top’ – you will mysqld_safe is still working hard.
After 10 mins or so connect using ‘mysql -u root -p<password>’ if it does not connect come back after 10 mins. You can also see the file size of ibdata files in /var/lib/mysql for clues.
Check engine status using the mysql command ’show engines’ – you will now see the innodb working.
Now to cleanly shutdown the system – DO NOT KILL the mysqld_safe. Instead use ‘mysqladmin shutdown’.
From then onwards you can use ‘/etc/init.d/mysqld start’ — YOU HAVE A GOOD DB!
show table status from <database-name>