Article directory
💻🔧【Super simple tutorial】Teach you how to modify step by stepphpMyAdminConfiguration, solutionMySQLImport failure issue❗️
Proven and effective✅, only takes three minutes⏰, completely solves the problemMySQLThe trouble of not being able to access the upload folder 📂.
No more headaches for import problems💡, easily handle database management📊, let yourLinuxThe system runs more smoothly🌟.
Linux ImportMySQL databaseWhat to do if it fails? Modify phpMyAdmin configuration method, come and see!
To find the installation path of phpMyAdmin, you can use the following command:
find / -name pma
Or
find / -name phpMyAdmin
If you find a path similar to the following:
/usr/local/cwpsrv/var/services/pma /usr/local/apache/htdocs/phpmyadmin

Installation path of phpMyAdmin
Well, congratulations, you have locked the installation location of phpMyAdmin!
Some control panel programs will install it in the `pma` folder, while others prefer to put it in the `phpMyAdmin` folder.
You may find these paths:
/usr/share/phpmyadmin /usr/share/phpmyadmin/vendor/phpmyadmin /usr/local/hestia/install/rpm/phpmyadmin /usr/local/hestia/install/deb/phpmyadmin /var/lib/mysql/phpmyadmin /var/lib/phpmyadmin /etc/phpmyadmin
After testing, it was finally confirmedHestiaCPphpMyAdmin installation path:/etc/phpmyadmin
Next, you can log into phpMyAdmin, select the database, and click "Import." However, the import functionality may be limited by default.
However, we can modify the phpMyAdmin configuration file to allow it to support importing MySQL database files from the server. The specific steps are as follows:
Modify phpMyAdmin configuration file
Find and edit the `config.inc.php` file. If there is only `config.sample.inc.php`, make a copy and rename it to `config.inc.php`.
1. Find the following configuration:
$cfg['UploadDir'] = ''; $cfg['SaveDir'] = '';
2. Modify to:
$cfg['UploadDir'] = '/tmp'; $cfg['SaveDir'] = '/tmp';
Attention points
Please note that the /tmp folder here is in the root directory of the server.
You can then upload the MySQL files to this /tmp directory. Use SFTP to put the files in /tmp and then select Import in the database management of phpMyAdmin (you may need to log in again to see the changes).
If you are using HestiaCP, sometimes phpMyAdmin may not support the default path. In this case, modify the phpMyAdmin configuration file and change the path to the website user's `tmp` directory:
$cfg['UploadDir'] = '/home/admin/tmp'; $cfg['SaveDir'] = '/home/admin/tmp';
If you encounter "Upload folder from website server`/home/admin/tmp/If "No files can be uploaded!" is displayed in the "Select" menu, it means that the folder permissions are insufficient.
Just add `/home/admin/tmp`Set the directory permission to `755`:
sudo chown www-data:www-data /home/admin/ -R sudo chmod 755 /home/admin/ -R
Now, you can happily import your MySQL files from this path! 🚀
If you try the above method, phpMyAdmin imports the MySQL databaseStill invalid, orIf you get a 500 error when importing a MySQL database, try the following methods▼
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ )'s sharing of "How to modify phpMyAdmin configuration to solve the problem of no MySQL database files available for upload?" may be helpful to you.
Feel free to share this article's link: https://www.chenweiliang.com/cwl-157.html
