The only way for you to have it is to add it to your my.cnf
.
Before you can add this option, you must make sure the InnoDB storage engine is available.
Please run these commands
SHOW VARIABLES LIKE 'have_innodb';
SHOW ENGINES;
If you see this:
mysql> SHOW VARIABLES LIKE 'have_innodb';
+---------------+----------+
| Variable_name | Value |
+---------------+----------+
| have_innodb | DISABLED |
+---------------+----------+
1 row in set (0.01 sec)
mysql> SHOW ENGINES;
+------------+----------+----------------------------------------------------------------+
| Engine | Support | Comment |
+------------+----------+----------------------------------------------------------------+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
| InnoDB | NO | Supports transactions, row-level locking, and foreign keys |
| BerkeleyDB | NO | Supports transactions and page-level locking |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE | NO | Example storage engine |
| ARCHIVE | YES | Archive storage engine |
| CSV | YES | CSV storage engine |
| ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables |
| FEDERATED | YES | Federated MySQL storage engine |
| MRG_MYISAM | YES | Collection of identical MyISAM tables |
| ISAM | NO | Obsolete storage engine |
+------------+----------+----------------------------------------------------------------+
12 rows in set (0.00 sec)
mysql>
then you have skip-innodb
in your my.cnf. You should comment it out and restart mysql
What you want to see is this:
mysql> SHOW VARIABLES LIKE 'have_innodb';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_innodb | YES |
+---------------+-------+
1 row in set (0.00 sec)
mysql> SHOW ENGINES;
+------------+----------+----------------------------------------------------------------+
| Engine | Support | Comment |
+------------+----------+----------------------------------------------------------------+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys |
| BerkeleyDB | NO | Supports transactions and page-level locking |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE | NO | Example storage engine |
| ARCHIVE | YES | Archive storage engine |
| CSV | YES | CSV storage engine |
| ndbcluster | DISABLED | Clustered, fault-tolerant, memory-based tables |
| FEDERATED | YES | Federated MySQL storage engine |
| MRG_MYISAM | YES | Collection of identical MyISAM tables |
| ISAM | NO | Obsolete storage engine |
+------------+----------+----------------------------------------------------------------+
12 rows in set (0.00 sec)
mysql>
Add that option to the my.cnf
[mysqld]
innodb_flush_method=O_DIRECT
then run
service mysql restart
Afterwards, you should be able to see it if you run
mysql> show variables like 'innodb_flush_method';
+---------------------+----------+
| Variable_name | Value |
+---------------------+----------+
| innodb_flush_method | O_DIRECT |
+---------------------+----------+
1 row in set (0.00 sec)
mysql>
UPDATE 2013-04-12 14:25 EDT
I just realized you are running the Windows version of MySQL. What was I thinking ?
As point by @yercube's comment, innodb_flush_method
is not available for Windows. Here is the MySQL Documentation on it:
Controls the system calls used to flush data to the InnoDB data files and log files, which can influence I/O throughput. This variable is relevant only for Unix and Linux systems. On Windows systems, the flush method is always async_unbuffered and cannot be changed.
If you need this performance enhancement, migrate your data to the Linux version of MySQL.
The option character-set-database should not be configured in my.cnf
.
Please note what the MySQL Documentation says on character-set-database
:
The character set used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as character_set_server.
Footnote : This option is dynamic, but only the server should set this information. You should not set the value of this variable manually.
Even the Documentation says it is dynamic, it not supposed to be dynamically by any manual intervention against my.cnf
. If you look inside the database subfolder, you will find a file called db.opt
. EXAMPLE : When you run use dbname
in the mysql client, the file /var/lib/mysql/dbname/db.opt
is read in order to set character-set-specific database options contained in that file. For this reason, the variable has to be dynamic.
If you cannot access the database from the OS to see db.opt
, simply run this command:
SHOW CREATE DATABASE dbname;
on any database and you will see what db.opt
contains (or defaults if db.opt
is not there)
mysql> show create database mysql;
+----------+------------------------------------------------------------------+
| Database | Create Database |
+----------+------------------------------------------------------------------+
| mysql | CREATE DATABASE `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */ |
+----------+------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql>
In light of this, you should try setting character-set-server
in my.cnf
only (or at least remove character-set-database
from my.cnf
). Then, run service mysql restart
.
Give it a Try !!!
UPDATE #1
I sort of dealt with a question like this before : Why default character_set_server is latin1?
Looking back at my old link, I had an idea: I ran this:
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.10 |
+-----------+
1 row in set (0.00 sec)
mysql> select * from information_schema.collations where COLLATION_NAME like '%kor%';
+-----------------+--------------------+----+------------+-------------+---------+
| COLLATION_NAME | CHARACTER_SET_NAME | ID | IS_DEFAULT | IS_COMPILED | SORTLEN |
+-----------------+--------------------+----+------------+-------------+---------+
| euckr_korean_ci | euckr | 19 | Yes | Yes | 1 |
+-----------------+--------------------+----+------------+-------------+---------+
1 row in set (0.00 sec)
mysql>
You could set a Korean character set if need to.
UPDATE #2
You should leave wait_timeout and interactive_timeout out of the [client]
and [mysql]
groups.
Best Answer
You could use this reference: MySQL Documentation.
For example: