CommandDescription
mysqldump -p <DATABASE> > file.sqlDump database to file
mysql -u <USER> -p <DATABASE> < file.sql
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
  • No labels