MySQL server5.7 can not find My.ini, only My-default.ini

Source: Internet
Author: User

The result is that when you try to import a CSV file into a MySQL table, the following error occurs:

"The MySQL server is running with the--SECURE-FILE-PRIV option so it cannot execute this statement"

Baidu a bit, the reasons given are:

MySQL new feature secure_file_priv the effect on read-write files, this switch defaults to NULL, that is, import and export is not allowed.

The workarounds are:

Under Windows: Modify My.ini Add Secure_file_priv in [mysqld] =

Under Linux: Modify MY.CNF add Secure_file_priv in [mysqld] =

Then restart MySQL, then query Secure_file_priv

Then I installed the MySQL server5.7 located in the C-disk directory C:\Program Files\mysql\mysql Server 5.7 did not find My.ini, only My-default.ini, try to my-default.ini the [ MYSQLD] under Add Secure_file_priv =, does not work, and finally found that the possible solution is:

Summarize:

(1) Mysql5.7 Modify the mysql5.7 installation directory My-default.ini discovery does not work, you need to modify the My.ini configuration file under C:\ProgramData\MySQL\MySQL Server 5.7 ( MySQL default read My.ini configuration file under C:\ProgramData\MySQL\MySQL Server 5.7)

(2) My-default.ini can also be copied a copy of the file name to My.ini, and then in My.ini [mysqld] Add secure_file_priv =. or modify the configuration in C:\ProgramData\MySQL\MySQL Server 5.7\my.ini

  Permissions Issue reference : http://www.cnblogs.com/qlqwjy/p/7989293.html

MySQL server5.7 can not find My.ini, only My-default.ini

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.