how import a mysqldump without ENGINE specified in MyISAM - mysql

all my sqldumps are without the "Engine=..." syntax in the CREATE Statements, so
maybe i can somehow add "ENGINE=MyISAM" to the default import?
because on my ubuntu 12.04 server with mysql 5.5 importing a large table is very slow, because it is using the standard InnoDB when i just import it
or can i set a settings flag in mysql, that new tables created are MyIsam as default?

To set the default engine to MyISAM, use the following configuration option in my.cnf:
default-storage-engine=MyISAM

According to the docs, you can:
start the server with a specified default storage engine:
You can specify the default engine by using the --default-storage-engine server startup option,
change the config file
or by setting the default-storage-engine option in the my.cnf configuration file.
change the engine on a session by session basis
You can set the default storage engine to be used during the current session by setting the default_storage_engine variable

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.

Innodb Engine and Myisam Engine

I'm using mysql 5.5 version and using myisam engine for my database. But, Innodb engine not yet disabled. while I execute this command show variables like '%have%'; ,it returns have_innodb=yes. In this case,
can I disable the innodb engine and set zero to all innodb variables is possible ?
If you are using Windows, look for my.ini file in your MySQL Server installation directory. For Linux based OS look for my.cnf in the MySQL Server installation directory.
In that file un-comment the line skip-innodb by removing # from its beginning.
Note: Restart the server for watching changes taking effect.
EDIT:
When you have disabled Innodb, other Innodb related variables will not be set. You will not be able to access them.
See the screenshot attached first one when InnoDB is disabled, then InnoDB enabled
Hope it helps...

MySQL database engine: MyISAM for information_schema but InnoDB for other databases

I am currently using InnoDB for all my databases in MySQL, however I just noticed that my information_schema database uses MyISAM for tables that are not MEMORY.
I am in the process of investigating an InnoDB/MyISAM issue. While I don't think this is the cause of it, I am worried about this mixing. The database was originally set up with MyISAM. Later the my.cnf file was updated to reset the engine to InnoDB. I am using MySQL 5.5.10.
What are the possible issues that could occur with having your information_schema database set to MyISAM, but all your other databases set to MySQL?
For those looking for help:
If you came across this question in search of an answer or you want to know more, to see your default database engine:
show variables;
To see the engine assigned to tables in a database:
show table status;
My my.cnf settings:
[client]
default-character-set=utf8
[mysqld]
log=/usr/local/var/mysql/mysqld.log
character-set-server = utf8
collation-server = utf8_general_ci
lower_case_table_names=2
default_storage_engine=InnoDB
# Performance hacks:
innodb_flush_method=nosync
innodb_flush_log_at_trx_commit=0
The storage engine used is on a per-table basis. The default storage engine is used when creating a new table and you don't specify a storage engine for the new table.
The system tables would have been MyISAM regardless of what you set the default storage engine to.
From MySQL documentation:
Important
Do not convert MySQL system tables in the mysql database (such as user
or host) to the InnoDB type. This is an unsupported operation. The
system tables must always be of the MyISAM type.
If you are not querying the information_schema tables directly, there is no concern about mixing the types.

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

How do I set a schema level default engine? [MySQL]

I'm trying to set a default database engine for each of my MySQL schemas, but I can't seem to find out how to do that.
I know it's possible to specify the engine at the table level, and in the config file with --default-storage-engine=type, but isn't there a way to set it at the schema level?
No, you can set the engine to use in the CREATE TABLE statement, or you can set the default using the --default-storage-engine server startup option, or by setting the default-storage-engine option in the my.cnf configuration file. Finally you can set the default storage engine to be used during the current session by setting the storage_engine variable storage_engine.
There's no default schema storage engine.