1. 安装

2. 登录
本机上的MYSQL:mysql -u root -p
连接到远程主机上的 MySQL:mysql -h -u root -p

3. 查看用户信息
select user,host,password from mysql.user;
select user,host from mysql.user;

4. 查看系统已存在的数据库
show databases;

5. 添加数据库
drop database if exists msmail;
create database msmail;

6. 改变使用的数据库
use msmail;

7. 查看当前使用的数据库
select database();

8. 添加用户
grant all privileges on msmail.* to 'cc'@'%' identified by 'cc';
This entry was posted in Computer, Database. Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s