MySQL or Mariadb migrate your whole database from utf8 → utf8mb4 - PHPMyAdmin
Step 1
Login to your PHPMyAdmin using your Database credentials>
from the right-side menu select the database you want to migrate, then from the top menu click on SQL
- Change database default
There copy and paste the query below to migrate - Change database default and click on Go
1:
ALTER DATABASE your_database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
Step2
-- Generate conversion queries for all tables
also copy and paste these queries below to Generate conversion queries for all tables (don't forget to replace your_database_name) with your actual database name
SELECT CONCAT(
'ALTER TABLE `', table_name, '` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
) AS conversion_query
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
AND TABLE_TYPE = 'BASE TABLE';
- 0 Comments
- 10 Views
- Share:
Login To Post Your Comment