MySQL

Mettre à jour le mot de passe d'un utilisateur

SET PASSWORD FOR 'sonerezh'@'localhost' = PASSWORD('XXXXXT')



Connaître la taille d'une base

SELECT table_schema, round(sum(data_length+index_length)/1024/1024,4) AS "Size (MB)" 
FROM information_schema.tables GROUP BY table_schema;


Mettre à jour un champ pour le retour d'un select

UPDATE `joomla_content` set `metakey`='trycoaching'   WHERE `metakey` = '';


Supprimer des enregistrements

DELETE  FROM `piwik_archive_numeric_2013_07` WHERE      name='Actions_nb_downloads'


Connaître la taille des tables d'une base

# ex avec table : test
SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "test";


Liens Externes