Innodb Engine and Myisam Engine - mysql

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...

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.

Enable InnoDB in MySQL

I want to use foreign key in MySQL. For that I needed to enable InnoDB feature. I have tried downloading latest version of MySQL Server from its official site.
I went through similar questions on stackoverflow but they addressed different issues.
I have tried editing all the .ini files and enabling InnoDB properties by removing # in front of corresponding properties.
Then I restarted MySQL and checked status of InnoDB from MySQL Client using query/
show engines;
It still shows InnoDB is disabled
I want to know steps of enabling the built in InnoDB feature for MySQL.
Here are the links to questions I visited:
Ques1
Ques2
Official MySQL forum
I am newbie in MySQL.
I will be very thankful for any help :-)
Check mysql log file. There could be some messages that may explain why InnoDB does not start. I suppose you don't have important InnoDB data. If so, try deleting ib_logfile0.xxx files and ibdata located in mysql data dir, then restart mysql to force those file to recreate. Also, check if innodb variables in my.cnf are properly configurated (For example, I have set memory for innodb_pool... to 1024G instead of 1024M, as a mistake).

how import a mysqldump without ENGINE specified in MyISAM

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

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?

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).