MySQL启用导入外部数据功能

默认情况下,mariadb没有启用外部导入数据功能,需要手动开启。

如果导入数据时,出现下图报错,可以使用下面方式解决

bytetoy.cn

  • 查看local_infile变量
mysql> show global variables like 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile  | OFF   |
+---------------+-------+
1 row in set (0.00 sec)
  • 开启local_infile变量
mysql> set global local_infile=1;
Query OK, 0 rows affected (0.00 sec)

将当前帐号退出再重新登录即可导入外部csv数据了

results matching ""

    No results matching ""

    results matching ""

      No results matching ""