mysqltuner.pl
shows me result
[!!] 2 different collations for database ccdb
I don't see two different COLLATE
on DB level. Is this even possible? How to verify?
> show create database ccdb;
+----------+---------------------------------------------------------------------------------------+
| Database | Create Database |
+----------+---------------------------------------------------------------------------------------+
| ccdb | CREATE DATABASE `ccdb` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */ |
+----------+---------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
> select * from information_schema.schemata where schema_name = 'ccdb';
+--------------+-------------+----------------------------+------------------------+----------+
| CATALOG_NAME | SCHEMA_NAME | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME | SQL_PATH |
+--------------+-------------+----------------------------+------------------------+----------+
| def | ccdb | utf8 | utf8_unicode_ci | NULL |
+--------------+-------------+----------------------------+------------------------+----------+
1 row in set (0.00 sec)
I see different TABLE_COLLATION
. Is this a problem?
> SELECT count(*), TABLE_COLLATION FROM information_schema.TABLES WHERE TABLE_SCHEMA='ccdb' group by TABLE_COLLATION;
+----------+-----------------+
| count(*) | TABLE_COLLATION |
+----------+-----------------+
| 29 | utf8_bin |
| 26 | utf8_general_ci |
+----------+-----------------+
2 rows in set (0.00 sec)
> select version();
+-----------------+
| version() |
+-----------------+
| 10.1.20-MariaDB |
+-----------------+
1 row in set (0.00 sec)
Best Answer
No, it is not a problem. The documentation sums things up.
The default database character set/collation values are used for a table if the relevant clauses are not specified at table creation time.