MySQL ERROR 1290 (HY000) --secure-file-priv option

后端 未结 9 1417
醉话见心
醉话见心 2020-11-30 03:19

I am trying to write the results of MySQL script to a text file using the following code in my script.

SELECT p.title, p.content, c.name FROM post p
LEFT JOI         


        
9条回答
  •  囚心锁ツ
    2020-11-30 03:38

    FOR MAC OS, if installed via HOMEBREW:

    Edit my.cnf PATH: /usr/local/etc/my.cnf

    COPY this:

    # Default Homebrew MySQL server config
    [mysqld]
    # Only allow connections from localhost
    bind-address = 0.0.0.0
    secure-file-priv = ''
    

    SAVE

    Explanation: Secure_file_prive = NULL -- Limit mysqld not allowed to import and export Secure_file_priv = '/tmp/' -- Limit mysqld import and export can only occur in /tmp/ directory Secure_file_priv = '' -- does not restrict the import of mysqld

提交回复
热议问题