3

This may sound like an extremely stupid question but I have no idea how to do this?

I'm running putty on my windows machine and i know if i wanted to import a database to a remote website i would just fire up putty and enter the host name and my username and password. Login to ssh and then create the database and then import the database like so: mysql production < production_2015.sql

What i don't understand is how to i ssh into my localhost which resides on my computer. I have phpMyAdmin and i could choose to continue to do the uploads like that but just like everything in phpMyAdmin it has major latency issues.

I feel dumb for asking this question but here's things i've tried. Opening putty and adding localhost where the host name goes. I've also tried to add the IP 127.0.0.1 where the host/ip goes in putty. I constantly just get a network error or connection refused. At this point i'm not even sure if this is how you would do it or not. I feel like this is a super easy question but i can't wrap my brain around the answer.

Here is my phpMyAdmin config.inc file:

$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'me';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Any help would be greatly appreciated.

1 Answer 1

1

Depending on your path, it would be something like this:

C:\xampp\mysql\bin\mysql.exe -u root -p production < production_2015.sql

There is more discussion in this question which might help.

Sign up to request clarification or add additional context in comments.

8 Comments

What console am i running this command in? I'll read over the link you added.
ahhh, ok, i'll give that a try... also this looks like my path: C:\wamp\bin\mysql\mysql5.6.17 What file in particular am i suppose to be looking for? A mysql executable file like so: mysql.exe?
Inside bin... i see that executable.. C:\wamp\bin\mysql\mysql5.6.17\bin\mysql.exe < this is the right one?
Yes mysql.exe should be it, you just seem to have an extra directory level which is fine
Thanks for helping this is exactly what i needed to know... I just tried it and i got an unknown variable '*password=your_password' so it looks like were getting somewhere.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.