Ispirer Ispirer
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sqlways:troubleshooting-guide:mysql:import:command-not-allowed-data-load [December 04, 2018, 03:46:34 PM]
alexandr.kirpichny
sqlways:troubleshooting-guide:mysql:import:command-not-allowed-data-load [April 26, 2019, 12:28:24 PM] (current)
darya.prikhodkina [Solutions]
Line 6: Line 6:
 ====== ERROR 1148 (42000): The used command is not allowed with this MySQL version   ====== ====== ERROR 1148 (42000): The used command is not allowed with this MySQL version   ======
  
-===== Symptoms =====+===== Error Description =====
  
 While importing data to MySQL version 8.0.2 and higher, an error "ERROR 1148 (42000): The used command is not allowed with this MySQL version" may occur.  While importing data to MySQL version 8.0.2 and higher, an error "ERROR 1148 (42000): The used command is not allowed with this MySQL version" may occur. 
Line 12: Line 12:
 ===== Cause ===== ===== Cause =====
  
-Ispirer SQLWays Wizard Tool makes data import using a mysql.exe utility and loads data from the file, which was generated by the tool on the same machine where you run the conversion. However, if you are running the migration process on the machine different from the one where your MySQL server is running, it means that you're trying to load data from a file located on a client side. Pleasetake into account that MySQL versions 8.0.2 and higher don't allow to load data from a client side by default. This setting is controlled by MySQL system variable "local-infile", which is set to "OFF" in the latest versions:+Ispirer SQLWays Wizard tool performs data import using a mysql.exe utility and loads data from the file, which was generated by the tool on the same machine where you run the conversion. However, if you are running the migration process on the machine different from the one where your MySQL server is running, it means that you're trying to load data from a file located on a client side. Please take into account that MySQL versions 8.0.2 and higher doesn't allow to load data from a client side by default. This setting is controlled by MySQL system variable "local-infile", which is set to "OFF" in the latest versions:
 ^  MySQL Version  ^ Default Value  ^  ^  MySQL Version  ^ Default Value  ^ 
 | **>= 8.0.2** | OFF | | **>= 8.0.2** | OFF |
Line 20: Line 20:
 ===== Solutions ===== ===== Solutions =====
  
-In order to resolve this problem, all you need is to set this option to "ON" in MySQL Server. Otherwiseyou can use an option "Enable Local Load" in the SQLWays Wizard tool. It will add an option "local-infile" in a command line that makes data load into MySQL database. +In order to resolve this problem, all you need is to set this option to "ON" in MySQL Server. Otherwise you can use the option "Enable Local Load" in SQLWays Wizard tool. It will add an option "local-infile" in a command line that makes data load to MySQL database. 
  
-Pleaseclick the "Advanced" button on a"Choose a Target Database" page:+Please click the "Advanced" button on a"Choose a Target Database" page:
  
 {{:sqlways:troubleshooting-guide:mysql:import:mysql_advanced.png|}} {{:sqlways:troubleshooting-guide:mysql:import:mysql_advanced.png|}}
Line 35: Line 35:
 __**Please, note:**__ __**Please, note:**__
  
-Both client and server should enable the local-file option. Otherwise it will not work. To enable it for files on the server side, add following to the my.cnf configuration file:+Both client and server should enable the local-file option. Otherwise it will not work. To enable it for files on the server side, add the following to the my.cnf configuration file:
 loose-local-infile = 1 loose-local-infile = 1
  
-More information about "loose-local-infile" option you can find here: __**[[https://dev.mysql.com/doc/refman/8.0/en/load-data-local.html|Security Issues with LOAD DATA LOCAL]]**__+More information about "loose-local-infile" option can be found here: __**[[https://dev.mysql.com/doc/refman/8.0/en/load-data-local.html|Security Issues with LOAD DATA LOCAL]]**__
  
  
Line 45: Line 45:
  
  
-If you don't see the "Advanced" button on this page, please switch the tool to the "Expert Mode". If you don't know how to do it, pleaserefer to this link: __**[[http://wiki.ispirer.com/sqlways/faq/expert-mode|How to Use SQLWays in Expert Mode]]**__+If you don't see the "Advanced" button on this page, please switch the tool to the "Expert Mode". If you don't know how to do it, please refer to this link: __**[[http://wiki.ispirer.com/sqlways/faq/expert-mode|How to Use SQLWays in Expert Mode]]**__
 \\ \\
  
sqlways/troubleshooting-guide/mysql/import/command-not-allowed-data-load.1543938394.txt.gz · Last modified: December 04, 2018, 03:46:34 PM by alexandr.kirpichny
 
© 1999-2019, Ispirer Systems Ltd.
All Rights Reserved.  Privacy Statement