It seems to me that phpMyAdmin imports tables by default with collation latin1_swedish_ci, how i change this?
For Linux:
You need to have access to the MySQL config file.
The location can vary from /etc/mysql/my.cnf
to ~/my.cnf
(user directory).
Add the following lines in the section [mysqld]
:
collation_server = utf8_unicode_ci
character_set_server=utf8
Restart the server:
service mysqld restart
I wanted to use utf8mb4 instead, and the configuration had to be the following:
collation_server = utf8mb4_general_ci
character_set_server=utf8mb4
the server would not start if the character_set was set to utf8
know this is an old post. But the way i changed the default charset through phpMyAdmin was:
phpMyadmin main page > Variables tab (Server variables and settings) > searched for "character" and changed all variables from "latin1" to "utf8". (on a MAMP installation with phpMyAdmin v. 3.5.7)
And as the others said, this is the variables for MySQL and not some phpMyAdmin specific ones.
For utf8mb4
, add/change the following in the [mysqld]
section:
collation_server = utf8mb4_unicode_ci
character_set_server = utf8mb4
Then restart the mysql
service (for Ubuntu the command is sudo service mysql restart
)
In your Mysql configuration change the default-character-set operative under the [mysqld] tab. For example:
[mysqld]
default-character-set=utf8
Don't forget to restart your Mysql server afterwards for the changes to take effect.
my.ini
(or my.cnf
)[mysqld]
collation_server = utf8_unicode_ci
character_set_server=utf8
config.inc.php
$cfg['DefaultConnectionCollation'] = 'utf8_general_ci';
You need to restart MySQL server and remove cookies,data for domain where is located PhpMyAdmin
Reload page with PhpMyAmdin and at look the result