User Tools

Site Tools


doc:appunti:linux:sa:mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
doc:appunti:linux:sa:mysql [2019/11/11 11:10] – [Riparazione di tabelle corrotte] niccolodoc:appunti:linux:sa:mysql [2020/03/31 18:25] – [Encoding del database e delle tabelle] niccolo
Line 336: Line 336:
   * **tables_priv** Table-level privileges.   * **tables_priv** Table-level privileges.
   * **columns_priv** Column-level privileges.   * **columns_priv** Column-level privileges.
-  * **procs_priv** Stored procedure and function privileges. +  * **procs_priv** Stored procedure and function privileges. 
 + 
 +===== Encoding del database e delle tabelle ===== 
 + 
 +Pare che ancora nel 2020 MySQL (MariaDB 10.3) crei le tabelle con encoding **Latin1**. Ecco come verificare l'encoding del database e di una tabella: 
 + 
 +<code> 
 +SELECT default_character_set_name FROM information_schema.SCHEMATA 
 +    WHERE schema_name = 'database_name'; 
 + 
 ++----------------------------+ 
 +| default_character_set_name | 
 ++----------------------------+ 
 +| utf8mb4                    | 
 ++----------------------------+ 
 +</code> 
 + 
 +<code> 
 +SELECT CCSA.character_set_name FROM information_schema.TABLES T, 
 +    information_schema.COLLATION_CHARACTER_SET_APPLICABILITY CCSA 
 +    WHERE CCSA.collation_name = T.table_collation AND T.table_schema = 'database_name' 
 +    AND T.table_name = 'table_name'; 
 + 
 ++--------------------+ 
 +| character_set_name | 
 ++--------------------+ 
 +| latin1             | 
 ++--------------------+ 
 +</code>
doc/appunti/linux/sa/mysql.txt · Last modified: 2023/03/27 11:31 by niccolo