Quantcast
Channel: General help
Viewing all articles
Browse latest Browse all 39737

Re: Strange characters after moving db and upgrading

$
0
0
by Guillermo Madero.  

Hello Mignonne,

I was a bit in a hurry before, so I just want to do some follow-up. You can run the following series of SQL statements to check that everything is actually fine (just make sure to change the db_name string with the name of your Moodle database).

** List the system character_set variables:

SHOW VARIABLES LIKE 'character_set\_%';

** List the system collation variables:

SHOW VARIABLES LIKE 'coll%';

** Check the character set and collation definition of the database:

SELECT schema_name                "database",
       default_character_set_name "character_set",
       default_collation_name     "collation"
FROM   information_schema.schemata
WHERE  schema_name = 'db_name';

** List those tables whose collation is not utf8_unicode_ci:

SELECT t.table_name,
       ccsa.character_set_name "table_character_set",
       t.table_collation
FROM   information_schema.tables t,
       information_schema.collation_character_set_applicability ccsa
WHERE  ccsa.collation_name = t.table_collation
   AND t.table_schema      = 'db_name'
   AND t.table_collation  != 'utf8_unicode_ci';

** List those columns whose collation is not utf8_unicode_ci:

SELECT table_name,
       column_name,
       character_set_name "column_character_set",
       collation_name     "column_collation",
       data_type,
       column_type
FROM   information_schema.columns
WHERE  table_schema = 'db_name'
   AND data_type IN ( 'char', 'varchar', 'tinytext', 'text',
                      'mediumtext', 'longtext', 'enum', 'set' )
   AND collation_name != 'utf8_unicode_ci';

 


Viewing all articles
Browse latest Browse all 39737

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>