SSH Import – Export…
 
Notifications
Clear all

[Sticky] SSH Import – Export MySQL Database

1 Posts
1 Users
0 Reactions
212 Views
(@cipher5)
Posts: 152
Member Admin
Topic starter
 

If you want to import a MySQL database using FTP/SFTP follow these steps.

[SIZE=3][B]1[/B][/SIZE]) Upload the database .sql file to a folder on your website.

[B][SIZE=3]2)[/SIZE][/B] In the dreamhost control panel, under Users enable SSH under the account you need to work under.

[SIZE=3][B]3[/B][/SIZE]) Download PuTTY
[URL] https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html [/URL]

[SIZE=3][B]4[/B][/SIZE]) Connect to your SSH server using the [U][B]SFTP/SS[/B][/U]H Dreamhost login info
[B]SFTP[/B]
cxnteam.com
[B]cxnteam[/B]
[B]password[/B]
22

Import example:
[B]mysql -h mysql.cxnteam.com -u cxnteam -p cxnteam_com < 22021.sql[/B] hit enter then it will ask for the [U][B]MySQL[/B][/U] [B]password – [COLOR=#ff0000][U][I]Make sure you don't use the SFTP password, only the MySQL password will work![/I][/U][/COLOR][/B]

[URL] https://help.dreamhost.com/hc/en-us/articles/221614988 [/URL]

When typing the password in it doesn't show, dont worry just hit enter after you put it in, and copy n paste dont seem to work either.

[SIZE=3][B]5[/B][/SIZE]) Take a look at PuTTY basic commands here: [URL] https://www.puttygen.com/putty-commands [/URL]
[B]pwd[/B]: As soon as you are logged into the server, the first and foremost thing to check would be the present location you are at.
[B]cd[/B]: Now, you are at a location and you want to navigate to another. Type cd /location and you will reach that location. It stands for change directory.
[B]cd .[/B] makes you stay at the same directory you are at.
[B]cd ..[/B] makes you shift one directory back. For example, you are at /home/task/files and you type cd.. and hit enter. This will move you to home/task
[B]cd -[/B] makes you go to the previous location you were at. For example, you were at /home but you moved to /dir. Typing cd- command will take you back to /home
[B]d ~[/B] will take you to your home directory and cd / will take you to root directory

[SIZE=3][B]E.G: mysql -h mysql.cxnteam.com -u cxnteam -p cxnteam_com /home/cxnteam/db_dumps/cxnteam10192021.sql[/B]

 
Posted : 19/10/2021 9:57 am
Share: