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目录下

猜你喜欢

转载自www.cnblogs.com/Victor-ZH/p/12309484.html