Personal Catalogue: PHP & MySQL — Chapter 1, Exercise 3 ==================================================== TASK Create the catalogue database yourself with the correct utf8mb4 charset, and write out a one-sentence explanation of why the charset was set explicitly rather than left at MySQL's own default. SOLUTION Run with: mysql -u root -p Then, at the mysql> prompt: CREATE DATABASE catalogue CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; To confirm it was created with the right charset: SHOW CREATE DATABASE catalogue; Output should show something like: CREATE DATABASE `catalogue` /*!40100 DEFAULT CHARACTER SET utf8mb4 ... */ One-sentence explanation: The charset was set explicitly to utf8mb4 because MySQL's own local default can vary between installs (sometimes still an older, narrower encoding on legacy setups) and, left unset, could silently store titles or author names containing accented characters or other characters outside that narrower range incorrectly or not at all. WHY THIS WORKS AS AN ANSWER ---------------------------- It supplies the actual working command with correct syntax, a real verification step (SHOW CREATE DATABASE), and a one-sentence rationale that matches the tip-box's own reasoning from the chapter rather than just repeating "it's good practice" without saying why.