Outils pour utilisateurs

Outils du site


linux:mysql (lu 64525 fois)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
linux:mysql [09-02-2020 21:14]
edmc73 [Sauvegarder]
linux:mysql [14-02-2023 11:39] (Version actuelle)
edmc73 [Sauvegarder]
Ligne 4: Ligne 4:
  
   * http://www.openlogic.com/wazi/bid/195905/Tips-and-Tricks-to-Optimize-MySQL - astuces   * http://www.openlogic.com/wazi/bid/195905/Tips-and-Tricks-to-Optimize-MySQL - astuces
-  * http://mysqltuner.com/ - script+  * https://github.com/major/MySQLTuner-perl - script
  
   wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl   wget --no-check-certificate https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
Ligne 64: Ligne 64:
   * --lock-tables=false : option stops MyISAM tables (if they exsit) being locked during the backup   * --lock-tables=false : option stops MyISAM tables (if they exsit) being locked during the backup
  
-Restaurer + 
 +Sauvegarder une table avec des conditions WHERE 
 + 
 +<code bash> 
 +# Dump only the rows with the id column bigger than 500 
 +mysqldump my_db_name my_table_name --where="id > 500" > my_backup.sql 
 + 
 +# Dump only the rows with the created_at column in the given interval 
 +mysqldump my_db_name my_table_name --where="date between '2020-09-01' and '2020-09-30'" > my_backup.sql 
 +</code> 
 +==== Restaurer ====
   mysql -u user -p nom_de_la_base < backup.sql   mysql -u user -p nom_de_la_base < backup.sql
  
Ligne 213: Ligne 223:
 Une requête intégressante Une requête intégressante
   SHOW ENGINE INNODB STATUS   SHOW ENGINE INNODB STATUS
 +
 +La commande **innotop** permet de faire comme **htop** avec beaucoup d'info sur ce qu'il se passe sur innodb
 +  innotop
      
  
linux/mysql.1581279242.txt.gz · Dernière modification: 09-02-2020 21:14 de edmc73