mysqldump -u root -p --all-databases > sqlbackup.sql
- <http://www.cyberciti.biz/faq/mysql-command-to-show-list-of-databases-on-server/>
- Datenbanken auflisten:
`show databases;`
- Datenbank auswaehlen:
`use yourdatabase;`
- Einzelne Tabellen der Datenbank auflisten:
- `show tables:`
- Liste alle Spaltenname einer Tabelle auf: [Link](https://dba.stackexchange.com/questions/6310/how-to-show-the-column-names-of-a-table-with-a-simple-sql-query)
- `select column_name from information_schema.columns where table_name='table';`
SELECT `key\` FROM database;
quit
CREATE DATABASE name;
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password here';
GRANT ALL PRIVILEGES ON gitorious . * TO 'username'@'localhost';
mysql -u root -p databasename < dump.sql