mysql导入导出无权限

error:The MySQL server is running with the --secure-file-priv option so it cannot execute this statement。

  1. 查看当前secure-file-priv

    • 登录mysql
    • show variables like '%secure%';
    • find / -name my.cnf 或者 find / -name my.ini
    • vim my.cnf 查看secure-file-priv=null
  2. 说明是由于secure-file-priv=null导致没有权限导入导出

    • 更改my.cnf 文件secure-file-priv=""
  3. 重启服务

  4. 如果secure-file-priv="/home/"说明导出只能发生在home目录下

posted @ 2020-02-14 20:57  今日店休  阅读(583)  评论(0编辑  收藏  举报