mysql mysql (operator)

为君一笑 提交于 2020-01-27 04:11:57

 

create database news default charset utf8 collate utf8_general_ci;

news  数据库名称
default charset utf8  默认使用utf8编码格式
collate  校对规则
utf8_general_ci 数据库采用utf8编码且大小写不敏感
ci:    case insensitive 的缩写,    不分大小写,大小写区分不敏感
cs: case sensitive的缩写,区分大小写,大小写敏感
by  weixin_44308407

输入:mysql>use 目标数据库名

如我输入的命令行:mysql>use news;

#MYSQL使用source命令,导入SQL文件

source student.sql

 

Where is student.sql  from?

mysql导出数据库:mysqldump -u 用户名 -p 数据库名 > 导出的文件名和路径 

                               mysqldump -u root -p mydb > news.sql 

 

 

 

 

 

 

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!