• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Importing large sql file via SSH

SamirM

Regular Pleskian
I have been trying quite unsuccessfully to import a large sql db file via phpMyAdmin for one of my clients. Since the db file is about 250mb I get a server timeout error.
Can anyone guide me as to how I can do this via SSH
I have a CentOS server 6.5, 64 bit that runs Plesk v 12.0.18
Thanks in advance
 
Hi SamirM,

please create a database over Plesk and then use the command over SSH:

mysql -u admin -p`cat /etc/psa/.psa.shadow` YOUR_DATABASE_NAME_WHICH_ALREADY_SHOULD_BE_CREATED < /path_to_your_SQL/NAME_OF_THE_SQL_WHICH_SHOULD_BE_IMPORTED.sql​
 
thnx UFHH01, and pardon my lack of knowledge, but do i need to provide the db username and password in the above command
 
Hi SamirM,

due to the case, that the above command uses the MySQL . Admin as username and the corresponding password, there is no need for any DB - username and DB - password, just replace "YOUR_DATABASE_NAME_WHICH_ALREADY_SHOULD_BE_CREATED" and "/path_to_your_SQL/NAME_OF_THE_SQL_WHICH_SHOULD_BE_IMPORTED.sql" with your correct DB - name and path to your SQL.
 
I used a slightly different command to import the db successfully, here is what i used:
mysql -u username -p dbname < the exact path whr the sql file us located/dbfile.sql , when you hit enter, it will ask for the password for the db and then start the import process, which if its a very huge db will take an inordinate long time to complete
 
Hello everyone, I hope this message is useful to people like me who happened on this page. Also I hope that after years you have solved :))) LOL
You can also use an app that splits the database (just set how many cuts and what size) in order to generate 2-3 files of 60-80mb each.
I always use a free DBSPLITTER in order to facilitate uploads with phpmyadmin.
Always follow the instructions. a schema file must be imported first, then the cut files.
I hope it is useful.
 
Back
Top