It seems to me that phpMyAdmin imports tables by default with collation latin1_swedish_ci, how i change this?
You can change the collation of any new objects that are created in a user database by using the COLLATE clause of the ALTER DATABASE statement. This statement does not change the collation of the columns in any existing user-defined tables. These can be changed by using the COLLATE clause of ALTER TABLE.
The default MySQL server character set and collation are latin1 and latin1_swedish_ci , but you can specify character sets at the server, database, table, column, and string literal levels.
PHPmyAdmin is installed but it has a bunch of databases installed as default. •cdcol (1) •information_schema (37) •mysql (24) •performance_schema (17) •phpmyadmin (8) •test •webauth (1)
The MySQL server has a compiled-in default character set and collation. To change these defaults, use the --character-set-server and --collation-server options when you start the server.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With