Home >Database >Mysql Tutorial >MySql实用笔记_MySQL

MySql实用笔记_MySQL

WBOY
WBOYOriginal
2016-06-01 13:18:56948browse

bitsCN.com

1. 双击mysqld.exe

2. 修改密码mysqladmin -uroot password journey

3. 导入数据库 先登录mysql, 输入 CREATE DATABASE databaseName DEFAULT CHARACTER SET uts8 DEFAULT COLLATE utf8_general_ci;

4. 输入source web.sql(sql 文件名)

5. show tables. 显示所有表

6. show databases; 显示所有数据库

6. drop table tableName; 删除表

7. drop database databaseNam 删除数据库

8. use dbName; 更改当前数据库

9.

9.1 use dbName;

9.2 INSERT INTO dbName (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv) VALUES ('%', 'dbName', 'userName', 'Y','Y','Y','Y','Y','Y','N');

向用户授权指定数据库的root权限

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn