Page 1 of 1

How can i Upload MYSQL Database

Posted: Sat Jan 21, 2006 11:28 pm
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

Posted: Sat Jan 21, 2006 11:35 pm
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

Posted: Sat Jan 21, 2006 11:36 pm
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.

Posted: Sat Jan 21, 2006 11:37 pm
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.