Command | Description |
---|---|
mysqldump -p <DATABASE> > file.sql | Dump database to file |
| Import database sql dump |
grant all privileges on <DATABASE>.* to <USER>@'%' identified by '<PASSWORD>' ie. grant all privileges on mydb.* to myuser@'%' identified by 'mypass' | Add user |
flush privileges; | Flush Privileges |
mysqlcheck -o <DATABASE> | Optimize database |
create user 'root'@'%' identified by 'xxx'; grant all privileges on wiki.* to root@'%' ; flush privileges; | New way to create a user |