Skip to content

Instantly share code, notes, and snippets.

@yzf
Created August 8, 2016 02:56
Show Gist options
  • Save yzf/08aa28eb4ae62b3c720ac71a1e0388cd to your computer and use it in GitHub Desktop.
Save yzf/08aa28eb4ae62b3c720ac71a1e0388cd to your computer and use it in GitHub Desktop.
添加mysql用户
# grant privileges for user
CREATE USER 'user_name'@'%' identified by 'password';
GRANT ALL PRIVILEGES ON db_name.* TO 'user_name'@'%';
FLUSH PRIVILEGES;
# create database pigeon
CREATE DATABASE db_name DEFAULT CHARSET utf8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment