Aucun résumé des modifications |
Aucun résumé des modifications |
||
| (Une version intermédiaire par le même utilisateur non affichée) | |||
| Ligne 1 : | Ligne 1 : | ||
{{#seo:|keywords=MySQL,WEB}} | {{#seo:|keywords=MySQL,WEB}} | ||
{{sommaire à droite}} | {{sommaire à droite}} | ||
Voir {{intralink |link=MySQL/Reinitialiser_le_mot_de_passe}} | Voir aussi {{intralink |link=MySQL/Reinitialiser_le_mot_de_passe}} | ||
== Mettre à jour le mot de passe d'un utilisateur == | == Mettre à jour le mot de passe d'un utilisateur == | ||
{{syntaxhighlight |lang=mysql|code= | |||
SET PASSWORD FOR 'sonerezh'@'localhost' = PASSWORD('XXXXXT') | SET PASSWORD FOR 'sonerezh'@'localhost' = PASSWORD('XXXXXT') | ||
}} | |||
== Connaître la taille d'une base == | == Connaître la taille d'une base == | ||
{{syntaxhighlight |lang=mysql|code=SELECT table_schema, round(sum(data_length+index_length)/1024/1024,4) AS "Size (MB)" | |||
FROM information_schema.tables GROUP BY table_schema; | FROM information_schema.tables GROUP BY table_schema;}}<br> | ||
== Mettre à jour un champ pour le retour d'un select == | == Mettre à jour un champ pour le retour d'un select == | ||
| Ligne 22 : | Ligne 22 : | ||
== Connaître la taille des tables d'une base == | == Connaître la taille des tables d'une base == | ||
{{syntaxhighlight |lang=mysql|code= | |||
# ex avec table : test | # 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"; | SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "test"; | ||
}}<br> | |||
== Liens Externes == | == Liens Externes == | ||
Voir aussi MySQL/Reinitialiser_le_mot_de_passe
SET PASSWORD FOR 'sonerezh'@'localhost' = PASSWORD('XXXXXT')
SELECT table_schema, round(sum(data_length+index_length)/1024/1024,4) AS "Size (MB)"
FROM information_schema.tables GROUP BY table_schema;
UPDATE `joomla_content` set `metakey`='trycoaching' WHERE `metakey` = '';
DELETE FROM `piwik_archive_numeric_2013_07` WHERE name='Actions_nb_downloads'
# 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";