Import Complete localhost database using command prompt mysql

For Ubuntu

Importing complete localhost (containing one or more databases)

mysql -u root -ppassword < /var/www/localhost.sql

For Windows

localhost.sql represent your sql file

Importing complete localhost (containing one or more databases)

mysql -u root -p password < /var/www/localhost.sql

localhost.sql represent your sql file

 

Importing single or large files using Command prompt

localhost.sql represent your sql file

Importing complete localhost (containing one or more databases)

mysql -u root -p password database_name < /var/www/localhost.sql

localhost.sql represent your sql file

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s