Line 3: |
Line 3: |
| '''Always use mysql "console" instead of "phpmyadmin" for Security reasons!!!''' | | '''Always use mysql "console" instead of "phpmyadmin" for Security reasons!!!''' |
| | | |
− | If you want to show the size of all databases installed do:
| + | ==List Size of all Databases== |
| | | |
− | login as mysql admin
| + | Login as mysql user admin |
| + | do: |
| <pre> | | <pre> |
| mysql -u admin -p | | mysql -u admin -p |
Line 15: |
Line 16: |
| </pre> | | </pre> |
| | | |
− | Create database named "test": | + | ==Create new Database== |
| <pre> | | <pre> |
| mysql> create database test; | | mysql> create database test; |
| </pre> | | </pre> |
− | Delete database named "test": | + | |
| + | ==Delete Database== |
| <pre> | | <pre> |
| mysql> drop database test; | | mysql> drop database test; |
| </pre> | | </pre> |
− | Update/Reload Databases at MYSQL Server:
| + | |
| + | ==Reload User Privileges== |
| <pre> | | <pre> |
| mysql> flush privileges; | | mysql> flush privileges; |
| </pre> | | </pre> |
− | Dump all Databases - Note: This do only if you want Restore the same Server, cause MySQL System Databases like "mysql or information_schema" are dumped too!! This will break on other Servers! | + | |
| + | == Dump all Databases== |
| + | Note: This do only if you want Restore the same "named" Server, cause MySQL System Databases like "mysql" or "information_schema" are dumped too!! |
| + | This will break on other MySQL Servers! |
| <pre> | | <pre> |
| mysql > mysqldump -u root -p --opt --all-databases > databases-dump-$date.sql | | mysql > mysqldump -u root -p --opt --all-databases > databases-dump-$date.sql |
| </pre> | | </pre> |
− | mysql > Its better you write a Bash Script to dump every Database for its own! This does not scramble a fresh setup!
| + | Remark: It's better you write a Bash Script to dump every Database for its own! This does not scramble a fresh Setup! |
− | | |
| == User Handling == | | == User Handling == |
| <pre> | | <pre> |