Skip to content

Instantly share code, notes, and snippets.

@mrsweaters
Last active January 29, 2016 19:51
Show Gist options
  • Select an option

  • Save mrsweaters/817dc0a0bf9dde7662ff to your computer and use it in GitHub Desktop.

Select an option

Save mrsweaters/817dc0a0bf9dde7662ff to your computer and use it in GitHub Desktop.
create and grant mysql permissions
mysql> CREATE USER '<user>'@'%' IDENTIFIED BY '<password>';
mysql> CREATE DATABASE <database_name>;
mysql> GRANT ALL PRIVILEGES on <database_name>.* To <user>@'%';
mysql> FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON dbName.* To 'username'@'host' IDENTIFIED BY 'password';
@mrsweaters
Copy link
Author

dump database without insert so we can rename the database in aws:
mysqldump -u username -ppassword -h host --opt --skip-extended-insert old_db_name > ~/dump.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment