XF 1.4 importing db with ssh

Ian S

Active member
hi all im stuck again, now last night after the problem with a import i deleted the table in the db, i then tried to get the dump that i had back onto the db but i got a timeout error, so i contacted the host and he said to use ssh cli, i downloaded putty for windows and i cant get it to work, i uploaded the db dump to the server and the host gave me the line to use for the life of me i cant get it to work, sorry for asking but ive checked google and on here before posting i tried using the cli on winscp but all i get is errors, thanx anyone that can help here my sql line

mysql -u **** -p**** /etc/psa/.psa.shadow` --default_character_set utf8 <DB name> < <filename.sql>
 
ok nothing worked i dont think the shell is working correctly on the winscp, i tried my xmapp version for my offline site and just typing mysql bought it straight up, ill have to find where its located on the server i think, please help anyone im loosing hair:cry::cry:
Drop me a PM
 
ok i just tried using bitvise ssh and get a error

which programs do people use for ssh? also when i got server password i got this error in attachment

IP Address: 1
Client Shell User: rtadmin
Client Shell Password: c
Server Root Password:

Note: We disable direct root access by default. You will need to login and then 'su' to root.
whats does this note mean ive removed numbers above, as when i tried to acccess the php.ini file to change the execution time, i tried to save file and got access denied
 

Attachments

  • error.webp
    error.webp
    8.8 KB · Views: 3
Last edited:
I do it slightly differently.

I connect to MySQL

mysql -u root -p

Once in there, choose the database you want to import into

use databasename;

and then import with

source /full/path/to/sql/file.sql;

hi mate ive managed to get into the root using putty wish they told ya when you type password it dont appear pmsl
anyways i tried this mysql -u root -p once in root and was prompted for another password, which password would that be??

thanx
 
ok right thanx andy, the host has sent me some commands im getting to grips with it now been playing all afternoon so for importing a db i need to cd / to where the file is and then run the mysql command line???
 
ok right thanx andy, the host has sent me some commands im getting to grips with it now been playing all afternoon so for importing a db i need to cd / to where the file is and then run the mysql command line???

YES, cd /to/the/current/backup/file/location/

then you will do the following for a backup:

Code:
mysqldump -uDBUSER -pDBPASS DatabaseName > backupdatabasename.sql

For an import:

Code:
mysql -uDBUSER -pDBPASS DatabaseName < backupdatabasename.sql
 
YES, cd /to/the/current/backup/file/location/

then you will do the following for a backup:

Code:
mysqldump -uDBUSER -pDBPASS DatabaseName > backupdatabasename.sql

For an import:

Code:
mysql -uDBUSER -pDBPASS DatabaseName < backupdatabasename.sql

thanx BoostN ill give that a go now i can access server;)(y)
 
Top Bottom