mysql error :解决无法把文件写入的问题
Posted Zeker62
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql error :解决无法把文件写入的问题相关的知识,希望对你有一定的参考价值。
error:
LOAD DATA LOCAL INFILE '/home/yzp/文档/pet.txt' INTO TABLE pet;
ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides.
try first:
set global local_infile=1;
Query OK, 0 rows affected (0.00 sec)
mysql> LOAD DATA LOCAL INFILE '/home/yzp/文档/pet.txt' INTO TABLE pet;
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
Connection id: 8
Current database: mydatabase
ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides
failed
try again:
root@yzp-KLV-WX9:/home/yzp/下载# mysql --local-infile=1 -u root -p;
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \\g.
Your MySQL connection id is 9
Server version: 8.0.25 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.
mysql> use database;
ERROR 1049 (42000): Unknown database 'database'
mysql> use mydatabase;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> LOAD DATA LOCAL INFILE '/home/yzp/文档/pet.txt' INTO TABLE pet;
Query OK, 1 row affected, 6 warnings (0.01 sec)
Records: 1 Deleted: 0 Skipped: 0 Warnings: 6
well,success.
以上是关于mysql error :解决无法把文件写入的问题的主要内容,如果未能解决你的问题,请参考以下文章
:-1: error: LNK1168: 无法打开 xxx.exe 进行写入
QT :-1: error: LNK1168: 无法打开 xxx.exe 进行写入
解决SQLSTATE[HY000]: General error: 2006 MySQL server has gone away问题的方法
mac os Mojave中brew安装的mysql因升级导致无法启动问题的解决