The .ibd files will be under the innodb_data_home_dir under a subdirectory, the subdirectory name matching the database name.
Given innodb_data_home_dir=/etc/local/mysql/data
and innodb_file_per_table
is set:
SHOW VARIABLES LIKE 'innodb_data_home_dir'
SHOW VARIABLES LIKE 'innodb_file_per_table'
then when table test.mytable is created, the .ibd file will be located in /etc/local/mysql/data/test/mytable.ibd
(It's possible that the ibdata1 file will grow to accommodate rollback for transactions. When a transaction is run, pre-change copies of blocks get recorded, in case you issue a ROLLBACK, and also for the benefit of concurrent transactions (with an appropriate isolation levels), that need to reference only committed changes, and not any uncommitted changes.)
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
If there's only one my.cnf file, and it's /etc/my.cnf, then that's the one it loads. From the manual:
So, if you check the other directories and there are no my.cnf files, you can be certain it's loading from /etc/my.cnf.
If you use MYSQLAdministrator, supposedly you can get it from Service Control->Configuration File->Config filename, as per this post.