How to alter the character set of a MySQL database.

Changing the Mysql database character set is needed sometimes so that our data wont appear scrambled on our website, to do so use this syntax.

  • Syntax to change the database character set for Mysql.
  • ALTER DATABASE "database name" DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci