• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Importing DB

PaulCaine

New Pleskian
Good day all,
I have just installed Plesk 12 on my new CentOS server and everything went well but!
I have managed the import most databases apart from my main one.

the database belongs the the CMS e107v2 and is around 31MB

I have so far changed,
post_max_size to 4000M
and
upload_max_filesize to 4000M

but im still not having any luck.
Im getting errors like,

Error
SQL query:


SET FOREIGN_KEY_CHECKS = ON;



MySQL said:

#2006 - MySQL server has gone away

Im In need of some help!

Thank you,
 
Thanks for your reply,
yes i updated the php.ini file like the link shows prior to me posting here but still didnt allow me to upload the DB.

Thanks.
 
Hi PaulCaine,

you are always able to import databases over ssh with the commands ( examples are for Plesk 12.5 ):
  1. Upload the desired database file to your preferred destination
  2. Login to your server over ssh with the user "root"
  3. DUMP the current database: plesk db dump DATABASE_NAME > /your/desired/location/on/your/server/database_name.sql
    1. OR with the command:
      MYSQL_PWD=`cat /etc/psa/.psa.shadow`
      mysqldump -u admin database_name > /your/desired/location/on/your/server/database_name.sql
  4. Import the desired datebase: plesk db psa < /your/desired/location/on/your/server/where/you/uploaded/the/database/database_name.sql
    1. OR with the command: MYSQL_PWD=`cat /etc/psa/.psa.shadow`
      mysql -u admin database_name < /your/desired/location/on/your/server/where/you/uploaded/the/database/database_name.sql
Sometimes, it is necessary to drop a database, before restoring a backup/dump. In such a case, you could use the command: MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -e"DROP DATABASE database_name;"


To solve your issue with imports directly over phpMyAdmin, pls. consider to check, if your desired changes applied:
  1. Click on "Import" on your navigation bar on the top. Please either copy, or/and make a screenshot, so you can post the result for investigations.
  2. Pls. inform us about your complete Plesk version ( incl. MU ) and your complete operating system. ( Plesk 12.0.18 != 12.5.30 / CentOS = 5.x? 6.x? 7?
  3. Did you check the depending log - files at "/var/log/sw-cp-server/error_log" - could you pls. post possible errors depending to your issue?
  4. Did you restart the "sw-cp-server" ( or "psa" ) after you changed your desired settings in the php.ini? ( /etc/init.d/psa restart ( or /etc/init.d/sw-cp-server restart )
  5. You could as well post the modified php.ini for investigation reasons
 
I.M.H.O the initial php.ini settings used for the Plesk Panel (which is running its own webserver) are a bit conservative. If you have a
client with a succesful website and big database who is transferring his / her domainname to your server they will not be able
to make the mysql import themselves without intervention (changing the limits in the php.ini ) of the
sysadmin.


Maybe there is a good reason for it. I can think of causing too much load etc..
But the Plesk panel should make our life a bit easier.
Thats is the whole idea of the panel i.m.h.o.

So we can drink coffee while our clients are happy uploading / importing their sites ;)
 
Last edited:
Hi /dev/null,

the initial php.ini settings used for the Plesk Panel (which is running its own webserver) are a bit conservative
I don't agree here, because the commands to import a database over the command line are done within seconds for a root user - just inform your clients, that you will be happy to import the database(s) after the client-FTP-upload to their webspace(s) - you could as well offer to download a dump from a defined URL, to avoid wasting their time with possible uploads ( often enough, the old hoster offers download links, when they ask for backups ). MUCH, MUCH better, than having 10 ( or even more ) clients slowing down the sw-cp-server with ( sometimes ) huge database uploads over phpMyAdmin. This affects as well ALL users, currently logged in over the Plesk Control Panel. Pls. keep in mind, that some servers host as well resellers and 2000 - 3000 domains. ;) I'm very happy, that the Plesk - standard - configuration is "conservative". :D
 
Back
Top