Skip to content

Instantly share code, notes, and snippets.

@kurorido
Last active October 5, 2015 11:52
Show Gist options
  • Select an option

  • Save kurorido/0188cf6d3007456f9e13 to your computer and use it in GitHub Desktop.

Select an option

Save kurorido/0188cf6d3007456f9e13 to your computer and use it in GitHub Desktop.
MySQL
# 匯入
mysql -u <user> -p <password> <database> < <sql_filename>
# 匯出
mysqldump -u <user> -p <password> <database> > <sql_filename>
# 新增使用者
CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
# 加上權限
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' WITH GRANT OPTION;
# List all MySQL User
SELECT User FROM mysql.user;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment