• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 importing db with ssh

Ian S

Active member
#1
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>
 

Ian S

Active member
#6
cant get putty to work not sure why is the cli on winscp good enough boss??

500 MYSQL not understood

i get this after i execute the command line above
 

MattW

Well-known member
#12
/etc/psa/.psa.shadow suggest you are running in the plesk environment, and using that for the root password. That won't work on localhost xamp
 

Ian S

Active member
#13
roger that lol, yes its a plesk panel but im not using it to access ssh,

im using winscp cli matt, how would your command line read if i was in root or root is /httpdocs/ obviously its not the root threw the admin root though
 

MattW

Well-known member
#14
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;
 

Ian S

Active member
#15
thanx mate so for example if i open winscp and open the cli in the root how do i connect to mysql ill give it a try matey
 

MattW

Well-known member
#16
What is the exact command you are using now that isn't working? Liam has already told you to remove the <> around the database name and the file name. You still need to include the single < to tell MySQL to import the sql file. You also need to either be in the same directory as the file, or specify the full directory path to it.
 

Ian S

Active member
#17
cool yep ill try it 2morrow was just checking winscp 5 cli works as well as anything else really as i cant get putty to except the server password, the keyboard dont seem to type anything but the return key works :confused::confused::confused::confused::confused:

ill report back later as it currently 1.15am in the UK(y)
 

Ian S

Active member
#20
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: