SQL 1.7.7.0 1146 in ALTER TABLE `pr_store_lang` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci: Table 'barbieri_pr2.pr_store_lang' doesn't exist code example

Example 1: set utf8mb4 mysql tables

--For each database:

ALTER DATABASE
    database_name
    CHARACTER SET = utf8mb4
    COLLATE = utf8mb4_unicode_ci;
    
--For each table:

ALTER TABLE
    table_name
    CONVERT TO CHARACTER SET utf8mb4
    COLLATE utf8mb4_unicode_ci;
    
--For each column:

ALTER TABLE
    table_name
    CHANGE column_name column_name
    VARCHAR(191)
    CHARACTER SET utf8mb4
    COLLATE utf8mb4_unicode_ci;

Example 2: Converting mysql tables to charset utf8mb4

ALTER DATABASE
    database_name
    CHARACTER SET = utf8mb4
    COLLATE = utf8mb4_unicode_ci;

Tags:

Sql Example