当前位置:网站首页>本机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') ;
边栏推荐
- Flink Task退出流程与Failover机制
- Jericho turns on the display icon of the classic Bluetooth hid mobile phone to set the keyboard [chapter]
- VHDL实现单周期CPU设计
- Jericho is in non Bluetooth mode. Do not jump back to Bluetooth mode when connecting the mobile phone [chapter]
- 变量、流程控制与游标(MySQL)
- 24.(arcgis api for js篇)arcgis api for js点修改点编辑(SketchViewModel)
- Install torch 0.4.1
- unrecognized selector sent to instance 0x10b34e810
- 概率论公式
- Numpy中排序操作partition,argpartition,sort,argsort
猜你喜欢

树莓派设置wifi自动连接

21.(arcgis api for js篇)arcgis api for js矩形采集(SketchViewModel)

R data analysis: how to predict Cox model and reproduce high score articles

2022年上半年HIT行业TOP50

Baidu map JS development, open a blank, bmapgl is not defined, err_ FILE_ NOT_ FOUND

input_ delay

22. (ArcGIS API for JS) ArcGIS API for JS Circle Collection (sketchviewmodel)

线性表的查找

Open3D 网格滤波

How to customize the shortcut key for latex to stop running
随机推荐
R data analysis: how to predict Cox model and reproduce high score articles
About Confidence Intervals
Mobile measurement and depth link platform - Branch
Depth analysis of compilation constants, classloader classes, and system class loaders
Ubuntu20 installation redisjson record
2022.6.28
华为小米互“抄作业”
Jericho is in non Bluetooth mode. Do not jump back to Bluetooth mode when connecting the mobile phone [chapter]
Variables, process control and cursors (MySQL)
装饰设计企业网站管理系统源码(含手机版源码)
[swift] learning notes (I) -- familiar with basic data types, coding styles, tuples, propositions
[Dameng database] after backup and recovery, two SQL statements should be executed
Code quality management
存储过程与函数(MySQL)
Flutter3.0, the applet is not only run across mobile applications
Do you know the five most prominent advantages of E-bidding?
codeforces每日5题(均1700)-第七天
体会设计细节
【达梦数据库】备份恢复后要执行两个sql语句
My brave way to line -- elaborate on what happens when the browser enters the URL