当前位置:网站首页>win命令行中导入、导出数据库相关表
win命令行中导入、导出数据库相关表
2022-06-27 07:38:00 【晴泪】
命令行导出数据库相关表为sql文件
语法:mysqldump -h[主机所在IP] -u[用户名] -p[密码] [要导出的数据库]>[导出的路径/文件名.sql]
提示:不用进入数据库
第一行代码不用输入密码(第二行输入)
例子:mysqldump -hlocalhost -uroot -p spring>d:/qqq.sql

没有报错信息提示就是成功了
命令行导入SQL文件到MySQL中
1、登录mysql
语法:mysql -u[用户名] -p[密码];
例子:mysql -uroot -proot

2、进入数据库(如果没有则需要创建)
创建数据库语法:create database [数据库名] charset='utf8'
例子:use spring;

3、导入数据表
语法:source [所在的路径/文件名.sql]
例子:source d:/qqq.sql;

可能出现的错误
ERROR 1046 (3D000): No database selected
原因:没有选择数据库(use [数据库名])
ERROR 1231 (42000): Variable 'foreign_key_checks' can't be set to the value of 'NULL'
原因:内存限制(修改my.ini文件max_allowed_packet=1024M)
边栏推荐
- Nature、science、cell旗下刊物
- What are the specialties of database system engineers?
- 延时队列`DelayQueue`
- Mobile security tools -jad
- RNA SEQ data analysis in R - investigate differentially expressed genes in the data!
- What is a magnetic separator?
- jupyter notebook文件目录
- apifox学习
- 无论LCD和OLED显示技术有多好,都无法替代这个古老的显示数码管
- js中如何查看程序运行时间(计时器)
猜你喜欢

(笔记)Anaconda-Navigator闪退解决方法

js判断用户输入的数是否为质数(多种方法)

yarn create vite 报错 ‘D:\Program‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件

Common operation and Principle Exploration of stream

VNC Viewer方式的远程连接树莓派

大厂工作十年,年薪40万突然被裁员,公司想抛弃你,一分情面都不会留

Speech signal feature extraction process: input speech signal - framing, pre emphasis, windowing, fft- > STFT spectrum (including amplitude and phase) - square the complex number - > amplitude spectru

JS, and output from small to large

Cookie encryption 7 fidder analysis phase

JS use the switch statement to output the corresponding English day of the week according to 1-7
随机推荐
使用 Blackbox Exporter 测试网络连通性
通过uview让tabbar根据权限显示相应数量的tabbar
Goodbye, agile Scrum
Speech signal processing - concept (I): time spectrum (horizontal axis: time; vertical axis: amplitude), spectrum (horizontal axis: frequency; vertical axis: amplitude) -- Fourier transform -- > time
再见了,敏捷Scrum
Yarn create vite reports an error 'd:\program' which is neither an internal or external command nor a runnable program or batch file
JS use switch to output whether the result is qualified
JDBC parameterized query example
How torch.gather works
Websocket database listening
js打印99乘法表
js中如何查看程序运行时间(计时器)
(已解决) npm突然报错 Cannot find module ‘D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js‘
正斜杠反斜杠的由来
什么是浮选机?
R language consumption behavior statistics based on association rules and cluster analysis
Cookie encryption 6
js求所有水仙花数
Bean copy details
1-4 进制表示与转换