Mysql常用语句

(本文仅供自己笔记查看用)


新建database并导入数据:
mysql> CREATE DATABASE IF NOT EXISTS site_facelook CHARSET utf8 COLLATE utf8_general_ci;
mysql> use site_facelook;
mysql> set names utf8;
mysql> source D:/wwwroot/website/facelook.com/site_facelook.sql;


新建用户:
mysql> CREATE USER ‘user_facelook‘@‘localhost‘  IDENTIFIED BY ‘look10086‘;
mysql> GRANT ALL PRIVILEGES ON site_facelook.* TO user_facelook@localhost;

mysql> FLUSH PRIVILEGES;

 

Mysql常用语句

上一篇:数据库的三大范式


下一篇:自己设计大学排名-数据库实践