You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
O prompt do mysql deve ser iniciado com -u root para alguns comandos
$ mysql -u root
Create Database
$ CREATE DATABASE database_name;
Create User
$ CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Delete User
$ DROP USER 'user'@'localhost';
Access control
$ GRANT ALL PRIVILEGES ON database_name . table_name TO 'newuser'@'localhost';
# or
$ GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
$ FLUSH PRIVILEGES;
Dump
$ mysqldump -h HOST -u USER -pPASS DATABASE > sql_dump.sql
Restore
$ mysql -h HOST -u USER -pPASS DATABASE < sql_dump.sql