Error 1148 MySQL The used command is not allowed with this MySQL version

前端 未结 5 660
别那么骄傲
别那么骄傲 2020-11-30 10:38

I am using MySQL LOAD DATA LOCAL INFILE command and I get this error:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1148 The          


        
5条回答
  •  半阙折子戏
    2020-11-30 11:07

    Just follow the following process to solve the problem:

    1. Login to mysql using command line.

      mysql -u root -p

    2. Check the local infile status:

      SHOW VARIABLES LIKE 'local_infile';

    3. If the output is Off, run this command:

      SET GLOBAL local_infile = 1;

    4. Check the status again:

      SHOW VARIABLES LIKE 'local_infile';

    5. The output will be: see now

    6. Finally restart mysql:

      service mysql restart

提交回复
热议问题