upload MySQL database – Command Line

13 Nov

Method 1 :

Create database for database_name and import the sql:
$ mysqladmin -p create database_name
$ mysql -p database_name < /var/www/html/database.sql

Method 2 :

Upload large SQL file by command line
copy SQL (database.sql) file to mysql/bin

D:……\>mysql -u root -p
Enter Password:

mysql>use database_name;
mysql>source database.sql

SQL ok.
Enjoy, may it will save someones some time!

Leave a comment

Posted by on November 13, 2008 in Linux, php, resources


Tags: , , ,

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: