Skip to content

Instantly share code, notes, and snippets.

@tojibon tojibon/mysql.bat
Created Feb 8, 2019

Embed
What would you like to do?
Connect MySQL + Create Database + Import SQL via terminal
mysql -u root -p
CREATE DATABASE phpapp_db;
CREATE USER 'phpapp_user'@'localhost' IDENTIFIED BY 'phpapp_user_pass';
GRANT ALL ON phpapp_db.* TO 'phpapp_user'@'localhost';
exit;
mysql -u phpapp_user -pphpapp_user_pass -D phpapp_db;
exit;
mysql -u phpapp_user -pphpapp_user_pass -D phpapp_db < dummy_data.sql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.