Are you stuck with MySQL 8.0 Error 1148? We can help you fix it.
The MySQL Error 1148 occurs while importing data to MySQL version 8.0 and the higher versions.
At Bobcares, we often receive requests to fix MySQL errors as a part of our Server Management Services.
Today, let’s see how our Support Engineers fix the MySQL error 1148 for our customers.
Why does MySQL Error 1148 occur?
The MySQL Error 1148: ‘The used command is not allowed with this MySQL version’ occur while importing data to the latest MySQL 8.0 version.
It happens in most of the cases if the migration process is running on a different machine where the MySQL server is running. Here the data is loaded from a file located on the client-side.
By default, the MySQL versions 8.0 and higher don’t allow us to load data from the client-side.
The local-infile is a server variable and the MySQL error 1148 occurs when this variable is set to false or zero.
How to fix MySQL Error 1148?
Recently one of our customers contacted us with the MySQL 8.0 Error 1148. Now let’s discuss how our Support Engineers fix the MySQL error it for our customer.
To solve this problem we set the MySQL server variable local-infile to OFF in the latest and 8.0 versions. Otherwise, we use the option ‘Enable Local Load’ in the SQLWays Wizard tool.
- To enable the option we click the Advanced button on Choose a Target Database page.
- Then we check the option Enable Local Load.
The local-file option should enable on both the client and the server. To enable it for files on the server-side, we add the below command in my.cnf configuration file.
loose-local-infile = 1
We verify it by executing,
SHOW VARIABLES LIKE 'local_infile';
If we have super privileges, we execute the following command on the server.
SET GLOBAL local_infile = 1;
This fixes the MySQL Error 1148.
[Need more assistance to fix the MySQL Error 1148?- We’re available 24/7.]
Conclusion
In short, we’ve discussed the cause of the MySQL error 1148 in the latest MySQL version 8.0. Also, we’ve discussed how our Support Engineers fix this error for our customers.
0 Comments