Windows Apache+mysql/mariadb+perl/php/python, a group of open-source software used to build dynamic Web sites or servers, are themselves separate programs, but because they are often used together, they have a higher degree of compatibility, Together make up a powerful Web application platform. This article describes how to set up the MySQL encoding under Wamp.
Tools/Materials
- Wamp
- Text editing tools, we recommend using Subline
Method/Step
Open Wamp, click the Small green icon that appears in the lower-right corner of the Wamp startup, and then select MySQL console next to MySQL to open the MySQL command-line window.
Enter your MySQL password in the Black command-line window and enter MySQL.
Input command: Show variables like '%char% ';
Check out the code for MySQL now.
In the result of the above command we can see the installation directory of Wamp, find this directory, in the MySQL directory to select the My.ini, that is, the MySQL configuration file. Of course, you can also click on the Wamp to launch the green icon, choose MySQL under the My.ini. However, you cannot choose how to open it, only with the Windows default text Editing tool.
Find [MySQL] in the config file, add: Default-character-set=utf8. This is the encoding that is configured at client input.
Find [mysqld] and join: Default-character-set=utf8, which is the encoding for configuring the MySQL server.
For [client], join Default-character-set=utf8, which is the encoding for setting up the Wamp client.
After the configuration is completed, restart Wamp, and then open the command-line window, enter: Show variables like '%char% '; command to see if the encoding settings were successful.
How to configure the code for MySQL under Wamp