Difference between revisions of "Converting the webwork database from the latin1 to the utf8mb4 character set"

From WeBWorK_wiki
Jump to navigation Jump to search
(Created page with "These instructions explain how to convert the webwork database from the latin1 to the utf8mb4 character set. ==Check What the Current Character Set Is== Before we begin let's...")
 
Line 21: Line 21:
 
 
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  +
  +
Now issue the following mysql commands:
  +
mysql> Use webwork;
  +
...
  +
Database changed
  +
  +
  +
mysql> SELECT @@character_set_database;
  +
If the webwork database is using the latin1 character set you will see:
  +
+--------------------------+
  +
| @@character_set_database |
  +
+--------------------------+
  +
| latin1 |
  +
+--------------------------+
  +
1 row in set (0.04 sec)
  +
  +
mysql>

Revision as of 16:55, 6 March 2021

These instructions explain how to convert the webwork database from the latin1 to the utf8mb4 character set.

Check What the Current Character Set Is

Before we begin let's make use sure the webwork database is using the latin1 character set.

Log into mysql. Depending on your OS and mysql version, you will either use the command

$ mysql -u root -p 
Enter Password: <mysql root password>

or

$ sudo mysql
[sudo] password for wwadmin: <wwadmin password>

You should see something very similar to

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
...

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Now issue the following mysql commands:

mysql> Use webwork;
...
Database changed


mysql> SELECT @@character_set_database;

If the webwork database is using the latin1 character set you will see:

+--------------------------+
| @@character_set_database |
+--------------------------+
| latin1                   |
+--------------------------+
1 row in set (0.04 sec)

mysql>