当前位置:网站首页>本机mysql
本机mysql
2022-07-06 20:38:00 【Darin2017】
1、dos操作
cd 进入bin目录下;
mysql -hlocalhost -uroot -p。。。登录
show databases显示数据库;
use 库名;show tables显示数据表
2、
首先输入代码 show variables like 'local_infile'; 查看是否开启本地文件导入权限 若Value为ON 则,本地文件导入权限开启。
否则输入代码 set global local_infile = 1;开启权限。 在workbench database菜单下的连接设置界面,advanced窗口的others里添加以下代 码 OPT_LOCAL_INFILE=1
show variables like 'local_infile';
set global local_infile = 1;
在workbench database菜单下的连接设置界面,advanced窗口的others里添加以下代 码 OPT_LOCAL_INFILE=1
打开还是如此则在manage connections 中添加OPT_LOCAL_INFILE=1
3、
mysql安装目录下找到文件my.ini在最下边添加配置:
[mysqld]
secure_file_priv=D:\\mysql_import
[mysqld]
local_infile=1
cmd管理员身份进入,net stop mysql关闭服务,net start mysql重启服务
通过show variables like '%secure_file_priv%';
show variables like '%local%' 查看是否已更新;
4、workbench上传csv文件太慢处理方案:
cmd启动mysql; truncate mysql.sdi_tb001清空表, LOAD DATA INFILE 'D:\\mysql_import\\000.csv' INTO TABLE mysql.sdi_tb001 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n' IGNORE 1 LINES;上传数据(速度10秒100万条大概)
5、cmd导入csv文件时日期格式不匹配
load data infile 'D:\\mysql_import\\sdi20220706.csv' into table sdi_tb fields terminated by ',' lines terminated by '\r\n' ignore 1 lines
(edition_name,course_name,dttype,@var1,shifen,gongying,xuqiu,sdi)
set riqi= STR_TO_DATE(@var1,'%d/%m/%Y') ;
边栏推荐
- Significance and measures of source code confidentiality
- What is Ba? How about Ba? What is the relationship between Ba and Bi?
- 19.(arcgis api for js篇)arcgis api for js线采集(SketchViewModel)
- A 股指数成分数据 API 数据接口
- 19. (ArcGIS API for JS) ArcGIS API for JS line acquisition (sketchviewmodel)
- Mobile measurement and depth link platform - Branch
- input_ delay
- 20. (ArcGIS API for JS) ArcGIS API for JS surface collection (sketchviewmodel)
- pip只下载不安装
- .net中 接口可以有默认实现了
猜你喜欢

RestClould ETL 社区版六月精选问答

我的勇敢对线之路--详细阐述,浏览器输入URL发生了什么
![[leetcode] 450 and 98 (deletion and verification of binary search tree)](/img/89/dd7ac0d886e6bbca5a439386c576bb.jpg)
[leetcode] 450 and 98 (deletion and verification of binary search tree)

About Tolerance Intervals

1200.Minimum Absolute Difference

Appx code signing Guide

存储过程与函数(MySQL)

ubuntu20安裝redisjson記錄

体会设计细节

Under the tide of "going from virtual to real", Baidu AI Cloud is born from real
随机推荐
21. (article ArcGIS API for JS) ArcGIS API for JS rectangular acquisition (sketchviewmodel)
Jericho turns on the display icon of the classic Bluetooth hid mobile phone to set the keyboard [chapter]
[dream database] add the task of automatically collecting statistical information
SSL证书部署
Cryptography series: detailed explanation of online certificate status protocol OCSP
Baidu map JS development, open a blank, bmapgl is not defined, err_ FILE_ NOT_ FOUND
[colmap] 3D reconstruction with known camera pose
Not All Points Are Equal Learning Highly Efficient Point-based Detectors for 3D LiDAR Point
25. (ArcGIS API for JS) ArcGIS API for JS line modification line editing (sketchviewmodel)
Jerry's FM mode mono or stereo selection setting [chapter]
unrecognized selector sent to instance 0x10b34e810
R数据分析:cox模型如何做预测,高分文章复现
树莓派设置wifi自动连接
Depth analysis of compilation constants, classloader classes, and system class loaders
Sub pixel corner detection opencv cornersubpix
数学归纳与递归
How to customize the shortcut key for latex to stop running
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
海思万能平台搭建:颜色空间转换YUV2RGB
校招行测笔试-数量关系