Reputation: 533
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.
Upvotes: 3
Views: 1439
Reputation: 9048
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.
Upvotes: 1