当前位置:网站首页>本机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') ;
边栏推荐
- 什么是 BA ?BA怎么样?BA和BI是什么关系?
- [Dameng database] after backup and recovery, two SQL statements should be executed
- 小程序能运行在自有App中,且实现直播和连麦?
- Not All Points Are Equal Learning Highly Efficient Point-based Detectors for 3D LiDAR Point
- Depth analysis of compilation constants, classloader classes, and system class loaders
- Set static IP for raspberry pie
- Set WiFi automatic connection for raspberry pie
- A 股指数成分数据 API 数据接口
- U.S. Air Force Research Laboratory, "exploring the vulnerability and robustness of deep learning systems", the latest 85 page technical report in 2022
- 【DPDK】dpdk样例源码解析之三:dpdk-l3fwd_001
猜你喜欢

Depth analysis of compilation constants, classloader classes, and system class loaders

图形化工具打包YOLOv5,生成可执行文件EXE
![Jericho is in non Bluetooth mode. Do not jump back to Bluetooth mode when connecting the mobile phone [chapter]](/img/ce/baa4acb1b4bfc19ccf8982e1e320b2.png)
Jericho is in non Bluetooth mode. Do not jump back to Bluetooth mode when connecting the mobile phone [chapter]

QT 打开文件 使用 QFileDialog 获取文件名称、内容等

input_ delay

Free PHP online decryption tool source code v1.2

How to customize the shortcut key for latex to stop running

代码质量管理

1200.Minimum Absolute Difference

ubuntu20安裝redisjson記錄
随机推荐
Flutter3.0了,小程序不止于移动应用跨端运行
密码学系列之:在线证书状态协议OCSP详解
Search of linear table
Not All Points Are Equal Learning Highly Efficient Point-based Detectors for 3D LiDAR Point
Set WiFi automatic connection for raspberry pie
Free PHP online decryption tool source code v1.2
Flink Task退出流程与Failover机制
HDU 4337 King Arthur' S Knights it outputs a Hamiltonian circuit
腾讯云原生数据库TDSQL-C入选信通院《云原生产品目录》
Jerry's RTC clock development [chapter]
[leetcode] 450 and 98 (deletion and verification of binary search tree)
LAB1配置脚本
变量、流程控制与游标(MySQL)
CMB's written test - quantitative relationship
Vernacular high concurrency (2)
VHDL实现单周期CPU设计
Jerry's FM mode mono or stereo selection setting [chapter]
注意力机制原理
23.(arcgis api for js篇)arcgis api for js椭圆采集(SketchViewModel)
When you go to the toilet, you can clearly explain the three Scheduling Strategies of scheduled tasks