Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #### Show all databases: ####
- show databases;
- #### List databases size: ####
- SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
- #### Reset root password: ####
- service mysql stop
- mysqld_safe --skip-grant-tables &
- mysql -u root
- mysql> USE mysql;
- mysql> UPDATE USER SET password=PASSWORD("NEW-ROOT-PASSWORD") WHERE User='root';
- mysql> FLUSH PRIVILEGES;
- mysql> quit
- mysqladmin shutdown
- service mysql start
- mysql -u root -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement