Import Mysql db with different host cmd


import db using local wamp;

open cmd
path to your wamp server mysql
Like ::
cd D:\wamp\bin\mysql\mysql5.6.17\bin
mysql -h <host> -u <user> -p <pass>
eg. mysql -h 192.168.0.200 -u <user> -p <pwd>
it will give screen like

mysql>

Now

mysql>source <source of you pure sql file no zip>

eg. mysql>D:/db.sql;

eg. mysql>D:\db.sql;
it should star importing

hahahahahahhahahahahah
enjoy………………………..!

Advertisements

Import large mysql database using mysql command prompt


Click your wamp server icon then look for MYSQL > MSQL Console then run it.
console

If you dont have password, just hit enter and type :

mysql> use database_name;
mysql> source location_of_your_file;
If you have password, you will promt to enter a password. Enter you password first then type:

mysql> use database_name;
mysql> source location_of_your_file;
location_of_your_file should look like C:/mydb.sql

for desktop my location is like :: C:/Users/Zaheer/Desktop/db.sql/db.sql
so the command is mysql>source C:/Users/Zaheer/Desktop/db.sql/db.sql;

This kind of importing sql dump is very helpful for BIG SQL FILE.

I copied my file mydb.sq to directory C: .It should be capital C: in order to run

and that’s it.