To import large SQL file & occur error “incorrect format parameter” in PhpMyAdmin with XAMPP on Ubuntu or cPanel. To fix this error, you can change the character set encoding, increase the memory limit, or repair the corrupt MySQL database.
phpmyadmin – error incorrect format parameter comes due to various reasons such as MySQL database corruption, exceeding memory limit, less execution time set, etc in xampp ubuntu cpanel. Here are the “Incorrect format parameter” errors that can occur due to various reasons:
- Large file size: If you are trying to upload a large file or import a large database dump file, the server may reject it due to the file size limit set by the server.
- Memory limit: If the server’s memory limit is too low, it may also cause “Incorrect format parameter” error when uploading or importing large files.
- Server configuration issues: Sometimes, server configuration issues can cause this error. For example, if the server is running an older version of PHP or MySQL, it may cause issues with PHPMyAdmin.
- The “Incorrect format parameter” error occurs when you try to import a SQL file that has a different character set encoding than the one specified in PhpMyAdmin. This can happen if you create an SQL file in a text editor that uses a different character set encoding than that specified in PhpMyAdmin or if the SQL file is from a database with a different character set encoding than that used in PhpMyAdmin. Was exported.
How to fix phpMyAdmin error ‘Incorrect Format Parameter’
Here are four different solutions to fix the error “incorrect format parameter” in phpMyAdmin xampp ubuntu cpanel:
Solution 1: Change the character set encoding in PhpMyAdmin
To change the character set encoding in PhpMyAdmin when uploading files to fix the “Incorrect format parameter” error in PhpMyAdmin; You can do this, follow these steps:
- Login to PhpMyAdmin and select the database that you want to import the SQL file into.
- Click on the “Import” tab at the top of the page.
- In the “File to import” section, click on the “Choose File” button and select the SQL file that you want to import.
- Scroll down to the “Format-specific options” section and select the correct character set encoding for the SQL file.
- Click on the “Go” button to import the SQL file.
Solution 2: Increase the PHP limits
To increase PHP max file upload size limit and fix “incorrect format parameter” error; You can do this using the following steps:
- Increase the file upload limit: You can increase the file upload limit by modifying the “upload_max_filesize” and “post_max_size” values in the php.ini file. These values determine the maximum file size that can be uploaded or imported. You can increase these values to a higher limit to allow larger files to be uploaded or imported.
- Increase the memory limit: You can increase the memory limit by modifying the “memory_limit” value in the php.ini file. This value determines the maximum amount of memory that PHP can use. You can increase this value to a higher limit to allow PHP to handle larger files.
- Check server configuration: If the above solutions do not work, you should check the server configuration. Ensure that the server is running the latest version of PHP and MySQL. You can also try restarting the server to see if it resolves the issue.
- Use an alternative method: If the above solutions do not work, you can try using an alternative method to upload or import the file. For example, you can use the command line to import the database dump file instead of using PHPMyAdmin.
So, Open your php.ini file and edit the php.ini file, in our case, the path is “/etc/php.ini”. You need to change the given values accordingly based on your requirements:
max_execution_time = 3000 max_input_time = 600 memory_limit = 128M post_max_size = 100M upload_max_filesize = 100M
Solution 3: Directly run using SQL tab
To fix this simply dry run the SQL queries, you can do this using the following steps:
- Open your SQL file in a text editor
- Copy from your SQL file to the SQL tab
- Run this in your PHPMyAdmin console
Solution 4: import of Database using SSH Command
The easiest solution, you can import the MySQL database from a file from the ssh command line or terminal and fix the error incorrect format parameter; For that, you can use the mysql -u user -p database < backup_file.sql
commands:
mysql -u user -p database < backup_file.sql
Conclusion
The “incorrect format parameter” error is a common issue that can occur when using PhpMyAdmin in XAMPP on Ubuntu or cPanel. It happens when you try to import a SQL file that has a different character set encoding than the one specified in PhpMyAdmin. To fix this error, you can change the character set encoding in PhpMyAdmin or the SQL file, or you can convert the character set encoding of the SQL file. By following the solutions mentioned above, you can resolve the “incorrect format parameter” error and continue managing your databases efficiently using PhpMyAdmin.