MySql File to large to import using Windows XAMPP

MySql File to large to import using Windows XAMPP

You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit. Error when trying to import a file in MySQL. A workaround for this is. Get the MySQL backup and if zipped e.g. database.sql.gz, then unzip it. Now go to your sql.exe in a windows command prompt.
$ cd xampp\mysql\bin
Login into MySQL through the command line.
$ C:\xampp\mysql\bin>mysql.exe -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 826
Server version: 5.5.15 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use [database name]
Database changed

# Enter here the backup SQL file location
mysql>source C:\Users\[Your Name]\Desktop\[Database Name].sql

Categories: Posts