How can i Upload MYSQL Database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
navaneeth
Forum Newbie
Posts: 3
Joined: Sat Jan 21, 2006 11:25 pm
Contact:

How can i Upload MYSQL Database

Post by navaneeth »

Hi Experts

I have created PHP page with Mysql connection..Please tell me how to upload that to server. And what to use instead of this line mysql_connect('localhost'). localhost should be replaced with what address? Please help

Navaneeth
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

You should upload your file with FTP, or however you connect to your host

localhost should be fine on most hosts, you might also want to add in your username and password if your host requires one


http://www.php.net/mysql_connect
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Well, the most simple way to upload the files is ftp.

and as for connecting to the database, localhost should be fine (Depending on your server setup)

If localhost doesn't work, or if you are trying to connect to another computer use an IP address.

Note: If you are using an IP address the database may (should) require authentication from the server that is trying to connect.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

if your server supports php, you should only have to upload the file(s) via FTP. As for replacing the mysql_connect() call, you shouldn't have to, but you may want to check through the documentation provided by your host as they should tell you how to access the database from php.
Post Reply