大家好,又见面了,我是你们的朋友全栈君。
1.直接用命令
2.用分割器分割,再用导入
最后要commit,不然没有真的导入数据库中。
其中出现的问题:The MySQL server is running with the –secure-file-priv option so it cannot execute this statement
解决方法:
【我的做法】【必须SQL文件和数据表都要在指定目录中】指定路径查询:show variables like ‘secure_file_priv%’;
查询到的value值就是指定路径。
【方法2】在my.ini中修改路径,secure_file_priv=‘你想要的路径’,—-可以从指定路径导入导出数据
【方法3】在my.ini中修改路径,secure_file_priv= —–可以在任何路径导入导出。注意:等号要有,后面空着,引号也不要写
3.用python的pandas导入
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/162471.html原文链接:https://javaforall.cn
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有