upload database from local to webserver

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
junjustkim
Forum Commoner
Posts: 44
Joined: Thu May 22, 2008 8:48 pm

upload database from local to webserver

Post by junjustkim »

hi to all

Could anyone help me on how to upload my database from localhost into webserver. I created sample website and database from my localhost and now I want to upload into webserver. All the files I already uploaded but not yet my database I don't know the step how to move on. This is my first time.

Thanks in advance

Thank you
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: upload database from local to webserver

Post by s.dot »

Are you using PHPMyadmin? If so you can go to 'export' and get a dump of your database and then import it on your server.

Otherwise you can go to the command line and do

Code: Select all

mysqldump --user=yourusername --password=yourpassword --opt --allow-keywords --extended-inserts > filename.sql
Then import filename.sql to your webserver, either using PHPMyAdmin or command line:

Code: Select all

mysql -u yourusername -p
[enter password]
use yourdatabasename
\. /path/to/filename.sql
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
junjustkim
Forum Commoner
Posts: 44
Joined: Thu May 22, 2008 8:48 pm

Re: upload database from local to webserver

Post by junjustkim »

Thanks for your immediate replied.

Yes, I am using PHPmyadmin. I will make it a try and informed you later

a million thanks to you

Cheers
:P
Post Reply