zoukankan      html  css  js  c++  java
  • mysql server5.7 找不到my.ini,只有my-default.ini【mysql全局配置文件】

    起因是在尝试将csv文件导入mysql的table时,出现如下错误:

      “The MySQL server is running with the --secure-file-priv option so it cannot execute this statement”

    百度一下,给出的原因是:

    MYSQL新特性secure_file_priv对读写文件的影响,此开关默认为NULL,即不允许导入导出。

    解决方法为:

      windows下:修改my.ini 在[mysqld]内加入secure_file_priv =

      linux下:修改my.cnf 在[mysqld]内加入secure_file_priv =

    然后重启mysql,再查询secure_file_priv

      然后我安装的mysql server5.7 所在C盘目录C:Program FilesMySQLMySQL Server 5.7下没有找到my.ini,只有my-default.ini,尝试在my-default.ini的[mysqld]下加入secure_file_priv =,不起作用,最后发现可行的解决方法为:

    总结:

      (1)   Mysql5.7修改mysql5.7安装目录下my-default.ini发现不起作用,需要修改C:ProgramDataMySQLMySQL Server 5.7 下的 my.ini 配置文件(MySQL 默认读取 C:ProgramDataMySQLMySQL Server 5.7 下的 my.ini 配置文件) 

      (2)  也可以将my-default.ini拷贝一份,文件名改为my.ini,然后在my.ini的[mysqld]内加入secure_file_priv =..或者修改   C:ProgramDataMySQLMySQL Server 5.7my.ini中配置

     

      出现权限问题参考:http://www.cnblogs.com/qlqwjy/p/7989293.html

  • 相关阅读:
    错题
    static变量与普通变量的异同
    C—变量
    C—变量—register
    HDU_oj_1001 Sum Problem
    HDU_oj_1000 A+B Problem
    复变函数(上)
    信号与系统(下)
    信号与系统(中)
    信号与系统(上)
  • 原文地址:https://www.cnblogs.com/qlqwjy/p/8543325.html
Copyright © 2011-2022 走看看