How can I convert entire MySQL database character-set to UTF-8 and collation to UTF-8?
相关问题
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- MySQL: conduct a basic search
- Why sometimes there is one of more gap(s) in the v
- mySQL alter table on update, current timestamp
You can create the sql to update all tables with:
Capture the output and run it.
Arnold Daniels' answer above is more elegant.
Use the
ALTER DATABASE
andALTER TABLE
commands.Or if you're still on MySQL 5.5.2 or older which didn't support 4-byte UTF-8, use
utf8
instead ofutf8mb4
:You can also DB tool Navicat, which does it more easier.
Right Click Your Database & select DB Properties & Change as you desired in Drop Down
The only solution that worked for me: http://docs.moodle.org/23/en/Converting_your_MySQL_database_to_UTF8
Converting a database containing tables