Welcome to Dream.In.Code
Getting Help is Easy!

Join 107,162 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,343 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



database problem in mysql

 
Reply to this topicStart new topic

database problem in mysql

kaps
post 4 Jul, 2008 - 11:45 PM
Post #1


New D.I.C Head

*
Joined: 31 May, 2008
Posts: 22

hi frnds,

i have uploaded the mysql database on the remote server, and also i uploaded the my php script but still it is not working, i think the problem is in

CODE
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());


i think..somthing have to written in place of localhost

pl help me
User is offlineProfile CardPM

Go to the top of the page


realNoName
post 5 Jul, 2008 - 12:10 AM
Post #2


D.I.C Regular

***
Joined: 4 Dec, 2006
Posts: 253


My Contributions


if the php script and mysql are on the same server localhost should work if not then you need to replace localhost with the ip/hostname of the mysql server
User is offlineProfile CardPM

Go to the top of the page

kaps
post 8 Jul, 2008 - 05:25 AM
Post #3


New D.I.C Head

*
Joined: 31 May, 2008
Posts: 22

hi realnoname,

thanx for your advice, but i still unable to find the hostname of webserver..how can one find this...
pl help
User is offlineProfile CardPM

Go to the top of the page

LockEngel
post 23 Jul, 2008 - 01:29 PM
Post #4


New D.I.C Head

*
Joined: 23 Jul, 2008
Posts: 12



Thanked 1 times
My Contributions


Are you trying to access it over LAN or WAN?

If you want to access this only inside your LAN then just ping the host computer and grab the IP.

Otherwise if you're running the server locally but want to access it over WAN go to something like http://www.whatismyip.com grab your WAN IP and forward the appropriate ports (if needed).

If the server is being run remotely, what address are you using to add/update your content, or how are you connecting rather?
Use the hostname that you're using there.
For example, connecting to an IP - thats the hostname, connecting to a domain - hostname.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/27/08 09:22PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month