Change default collation in WampServer
Posted by: jonhh (62.169.234.---)
Date: January 12, 2017 11:30AM

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?

Options: ReplyQuote
Re: Change default collation in WampServer
Posted by: RiggsFolly (Moderator)
Date: January 12, 2017 11:57AM

Hi,

Not strictly a WAMPServer issue, but ....

WordPress will create its database any way it wants to.

Maybe you would be better to ask on the WordPress site if you believe that you want a specific collation, but I would imagine that WordPress uses that collation because it works for everybody.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Change default collation in WampServer
Posted by: Otomatic (Moderator)
Date: January 12, 2017 01:14PM

Hi,

Quote
jonhh
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
It's not up to you to force character sets.
It is the applications that must define the character sets and collations to use when creating databases, tables, and columns.
You leave the my.ini files as they are.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.