InnoDB restore database is very slow - mysql

I have Mysql installed version 5.1.49-1ubuntu8.1 (with default InnoDB without any modification)
When using InnoDB, the mysqldump and read performance is comparable to MyISAM, but restore database is very slow.
When trying to install Drupal on blank database also take too long
Other than default-storage-engine = innodb, Is there anything I need to do before use InnoDB?

You should disable keys on the tables while restoring. This is the default behavior with the dumps generated from mysqldump. What is the command line you are using for dumping data?
You should dump the tables in the order of the primary key.

Related

MySQL 5.1 InnoDB file-per-table option

My application uses MySQL 5.1.49 as its main DB.
The default table engine for my version of MySQL is MyISAM, but since I want to use InnoDB (which is the default engine for version 5.5 and higher), I have to specify the following line in the end of each CREATE TABLE statement:
ENGINE = InnoDB DEFAULT CHARACTER SET 'utf8' COLLATE 'utf8_bin';
I need to save a specific table in a different location within the file system. I turned on the file-per-table option, and added the DATA DIRECTORY flag.
MySQL ignores the DATA DIRECTORY flag when the active engine is InnoDB.
If I remove the InnoDB statement (thus forcing it to work with the default engine, MyISAM), it works, but then I lose all the advantages of the InnoDB engine.
Is there a way to combine them both WITHOUT upgrading to MySQL 5.5?
Thanks
No, the DATA DIRECTORY option is not supported for InnoDB until MySQL 5.6. The only way to achieve what you want would be to use symlinks at the filesystem level, but this is very dangerous and not recommended.

Can the MySQL system database tables be converted to InnoDB?

I've installed MySQL 5.5 recently. I'm using InnoDB as the engine for all my databases. I noticed that the mysql database default and all of it's tables (user, db, etc...) are MyISAM. Is there any reason they cannot / should not be InnoDB? Does anyone know if MySQL requires the mysql db to be MyISAM?
Warning
Do not convert MySQL system tables in the mysql database from MyISAM to InnoDB tables! This is an unsupported operation. If you do this, MySQL does not restart until you restore the old system tables from a backup or re-generate them with the mysql_install_db script.
http://dev.mysql.com/doc/refman/5.0/en/innodb-restrictions.html

Changing the engine to InnoDB from MyISAM is not working

I am trying to change the table engine from MyISAM to INNODB. I am using the
alter table tablename ENGINE=INNODB
command. I am not getting any errors or warnings on the mysql side. I also commented the
skip-innodb
line in my.cnf file. So when I do a
show variables like 'have-innodb%'
it gives me a "YES". Also just to be on the safe side, I also deleted my ib_logfile0 and ib_logfile1 and restarted my mysql server.
But it still does not change the engine. I also did a show engines, and it shows innodb as one of the available engines.
Also these tables are full of data and have around 5000 rows, so is changing the engine type when a table has data, would that be the problem??
What could the missing link be??
Are you able to restart the server? If so, the error log will tell you if it had problems initialising the InnoDB engine.
Is this the first InnoDB table in your db? If so, you may have forgotten to create your ibdata files.
Does the table use fulltext indexing or other InnoDB-incompatible features?

Mysql InnoDB database

All of my tables are InnoDB but PHPMyAdmin shows that the database is MyIsam: http://img708.imageshack.us/i/201103080940551280x800s.png/
How do I create new MySQL databases using InnoDB?
Running MySQL 5.1, in a Debian Sid box.
Thank you.
AFAIK it is showing MyISAM because that is your default storage engine on that database, i.e. if you were to create a new table and not specify the engine then it would be MyISAM.
You can change the default storage engine in your my.cnf file:
default-storage-engine=INNODB
Use MySQL Workbench for GUI interface:
http://wb.mysql.com/
You can it directly using SQL also:
ALTER TABLE products ENGINE = innodb

Convert InnoDB to MyISAM with InnoDB disabled

I'm the lucker owner of a webhotel where the host changes settings without telling.
When thats said,
I have some tables in my database that are running with InnoDB engine.
But over the night the host have disabled InnoDB, so I cant convert it to MyISAM with ALTER command.
Anyway I can get the data out of the database, or convert it to MyISAM when InnoDB is disabled?
Only thing I see all the time is,
#1033 - Incorrect information in file: 'file.frm'
Thanks.
Unfortunately, you need to have InnoDB enabled so that MySQL could read the data for conversion.
To recover the data on another instance, you would need ibdata* files from MySQL root data directory as well as all *.ibd files from your database directory (if your MySQL setup had innodb_file_per_table enabled).