Logo
BlogToast.
HomeAll PostsCategoriesRandom
Sign in
Logo
BlogToast.

Discover stories, insights, and perspectives from writers around the world.

Explore

  • All posts
  • Categories
  • Random

Dashboard

  • Sign in
  • Sign up
  • Forgot password

Legal

  • Contact
  • Privacy policy
  • Terms of service

© 2026 BlogToast. All rights reserved.

Missing expression. (near "ON" at position 25) SQL query. Fix !!!
Education2 min read

Missing expression. (near "ON" at position 25) SQL query. Fix !!!

N

N@rutO

September 26, 2024

Have you faced this error while importing sql file in MySql database ?

To put it simply, it is because of sql configuration in your my.ini or my.cnf file. It is configuration file for MySql database. I will be showing you how to fix the error in xampp but you can do it in other platforms as well.

Follow my steps to fix this error.

  1. Go to xampp control panel. and click mysql database.

  2. Click on configure.

  3. Press open conf file to edit configuration file.

  4. When the file is opened find max_allowed_packet

  5. It is blocking the upload of more than 1MB of file. Lets change it to 1024M

  6. Save the file and restart the mysql database. This is important.

  7. Go to your phpmyadmin page. Then create a new database.

  8. Enter database name and click create.

  9. Go to Import

  10. Select the file you want to import.

  11. Scroll to bottom and press Import.

  12. Wait for few seconds and then the file will be imported.

This is how you fix the error. If it is not fixed yet then it is the problem of apache server. Checkout this blog to see how it is fixed

Tags

sql near ON SET FOREIGN_KEY_CHECKS = ON
Advertisement

Discussion (0)

Related Blogs

Explore similar articles

What to do immediately after database update in laravel?
Education
3 min

What to do immediately after database update in laravel?

J

N@rutO

Aug 14

2 0
Setup environment variables in cypress: A comprehensive guide.
Education
2 min

Setup environment variables in cypress: A comprehensive guide.

J

N@rutO

Sep 18

0 0