1. install mysql

2. login
MYSQL instlled in local: mysql -u root -p
login to remote host:mysql -h -u root -p

3. check user information
select user,host,password from mysql.user;
select user,host from mysql.user;

4. check databases already exist
show databases;

5. add new database
drop database if exists msmail;
create database msmail;

6. use another database
use msmail;

7. check database which is using now
select database();

8. add user
grant all privileges on msmail.* to 'cc'@'%' identified by 'cc';

9. execute sql file
source d:/dir/msq.sql;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s