0
I have just installed WampServer (x64) in order to install a WordPress site. In localhost/phpmyadmin/
the Server connection collation is utf8mb4_general_ci
.
When I created a new DB, I defined the collation to be 'utf8_general_ci'
However, when I installed the wordpress I looked back in my DB and all the tables are in collation utf8mb4_unicode_520_ci
Why this was happened?
I tried and in C:\wamp64\bin\mysql\mysql5.7.14\my.ini
file under the tag [mysqld]
I added the:
character-set-server=utf8
collation-server=utf8_general_ci
Then I restarted the wampserver, I installed the wordpress from scratch and again all the tables has Collation utf8mb4_unicode_520_ci
How can I resolve this?
If it's the server connection collation it could be different from the collation that is actually used in the background. What's the reason that you want to make that change? As for your approach it's correct. You could check an individual DB or Table for it's actual collation. This would make
– Seth – 2017-01-12T10:38:00.583utf8mb4_unicode_520_ci
seem to be a better choice?The problem started when I tried to migrate the website to server which didn't support utf8mb4.. So they told me to change the collation to utf8_general.. – yaylitzis – 2017-01-12T10:43:47.673
But that is a totally different problem from what you described? If you did a migration did you check your SQL files for a fixed setting of the collation? – Seth – 2017-01-12T10:48:25.917
I am a newbie so I am afraid I don't know what do you mean exactly.. what should I do; – yaylitzis – 2017-01-12T10:51:32.263
For your migration you probably exported the existing database in some form using phpMyAdmin or mysqldump? Right? In that case you ended up with a
.sql
file which is just a normal text file. You could just replace lines that mentionutf8mb4_unicode_520_ci
with ones that have whatever character set or collation you want or drop those all together to use the server default. Though that would involve some risk as for the stuff you have in your DB, depending on what it is. – Seth – 2017-01-12T11:29:18.240well this exactly I did! However, now that I am building a new site I wanted to avoid this.. To export my DB, I do it from phpmyadmin.. – yaylitzis – 2017-01-12T14:27:48.170