MySQL import and export files encountered problems

Source: Internet
Author: User
Tags mysql command line mysql import

Today by statement: SELECT * FROM mytable to outfile ' D:/mytable.xls '; Export external files, but anyway unsuccessful, the system prompts: the MySQL server is running with the--SECURE-FILE-PRIV option so it cannot execute this state ment when executing ' SELECT into OUTFILE ';

So, by entering the command: show variables like '%secure% '; Query variable: The value of Secure_file_priv was found to be NULL;

    1. Restrict mysqld import when Secure_file_prive=null is not allowed | Export
    2. Restrict import of mysqld when secure_file_priv=/tmp/| Export can only occur in the/tmp/directory
    3. Do not mysqld Import | Export to do the restriction is: secure_file_prive=;
    4. So in the MySQL installation directory, locate the My.ini file, open it by Notepad, search [mysqld], enter under [mysqld]: Secure_file_priv = can
    5. Finally restart the MySQL service, how to restart the Windows service: Win+r Open the Run window, enter services.msc, the Windows Services window today. Find the MySQL service, select it, and click ' Restart '.
    6. Reopen MySQL command line Client. Enter the command to

MySQL import and export files encountered problems

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.