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 [2021/01/15 10:38] – [Encoding del database e delle tabelle] niccolodoc:appunti:linux:sa:mysql [2022/07/04 16:16] – [Comandi utili] niccolo
Line 121: Line 121:
 </code> </code>
  
-È possibile anche manipolare direttamente la tabella interna degli utenti:+Sarebbe possibile anche manipolare direttamente la tabella interna degli utenti, ma è opportuno **controllare la struttura della tabella prima di procedere!** Infatti - ad esempuio - la tabella **user** ha una struttura differente in **MariaDB 10**.
  
 <code sql> <code sql>
Line 142: Line 142:
 SET PASSWORD FOR root=PASSWORD('secret'); SET PASSWORD FOR root=PASSWORD('secret');
 SET PASSWORD FOR dbuser@10.0.1.2=PASSWORD('secret'); SET PASSWORD FOR dbuser@10.0.1.2=PASSWORD('secret');
 +</code>
 +
 +La password è memorizzata storicamente nel campo **Password** della tabella **user**, ma versioni più recenti del motore MySQL (ad esempio **MariaDB 10**) possono usare plugin aggiuntivi e le informazioni staranno nei campi **plugin** e **authentication_string**:
 +
 +<code>
 +SELECT Host, User, Password, plugin, authentication_string FROM user;
 ++-----------+-----------+----------------+-----------------------+-----------------------+
 +| Host      | User      | Password       | plugin                | authentication_string |
 ++-----------+-----------+----------------+-----------------------+-----------------------+
 +| localhost | root      | *CAE6919BF3... |                                             |
 +| localhost | user1                    | mysql_native_password | *1472E83A1E...        |
 +| localhost | user2     | *B4C990D89F... |                                             |
 ++-----------+-----------+----------------+-----------------------+-----------------------+
 </code> </code>
  
doc/appunti/linux/sa/mysql.txt · Last modified: 2023/03/27 11:31 by niccolo