doc:appunti:linux:sa:mysql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:appunti:linux:sa:mysql [2019/02/05 13:03] – [Connessione senza digitare la password] niccolo | doc:appunti:linux:sa:mysql [2020/03/31 18:25] – [Encoding del database e delle tabelle] niccolo | ||
---|---|---|---|
Line 302: | Line 302: | ||
</ | </ | ||
+ | ===== Event Scheduler were found damaged ===== | ||
+ | |||
+ | È capitato un caso in cui un **mysqldump** generava il seguente errore (MariaDB 5.5.64 su CentOS 7.7): | ||
+ | |||
+ | < | ||
+ | mysqldump: Couldn' | ||
+ | Cannot proceed because system tables used by Event | ||
+ | Scheduler were found damaged at server start | ||
+ | </ | ||
+ | |||
+ | In effetti dal prompt SQL si riscontrava lo stesso problema: | ||
+ | |||
+ | < | ||
+ | CONNECT mysql; | ||
+ | SHOW EVENTS; | ||
+ | ERROR 1577 (HY000): Cannot proceed because system tables used | ||
+ | by Event Scheduler were found damaged at server start | ||
+ | </ | ||
+ | |||
+ | Dalla shell Unix sono stati eseguiti i seguenti comandi che hanno risolto il problema (non si sa se sono tutti e tre necessari, ma fino all' | ||
+ | |||
+ | < | ||
+ | mysqlcheck --all-databases --check-upgrade --auto-repair | ||
+ | mysql_upgrade | ||
+ | systemctl restart mariadb.service | ||
+ | </ | ||
===== Utenti e privilegi ===== | ===== Utenti e privilegi ===== | ||
Line 310: | 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' | ||
+ | |||
+ | < | ||
+ | SELECT default_character_set_name FROM information_schema.SCHEMATA | ||
+ | WHERE schema_name = ' | ||
+ | |||
+ | +----------------------------+ | ||
+ | | default_character_set_name | | ||
+ | +----------------------------+ | ||
+ | | utf8mb4 | ||
+ | +----------------------------+ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | 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 = ' | ||
+ | AND T.table_name = ' | ||
+ | |||
+ | +--------------------+ | ||
+ | | character_set_name | | ||
+ | +--------------------+ | ||
+ | | latin1 | ||
+ | +--------------------+ | ||
+ | </ |
doc/appunti/linux/sa/mysql.txt · Last modified: 2023/03/27 11:31 by niccolo