Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

MySQL localhost database from another host
(1 viewing) (1) Guest
All your queries regarding
MySQL Installation,
Learning MySQL DBA,
and tonnes more... will be solved in this forum
  • Page:
  • 1
TOPIC:

MySQL localhost database from another host

MySQL localhost database from another host 6 months, 2 weeks ago #822

  • sami
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
Hi,

I am trying to connect to MySQL database at on one host (Host1) from another host(Host2).

While I try to connect to the database at Host1 from Host1 itself the next is working fine for me:
mysql_connect("localhost","username","password")

Now I am trying to find out what to use instead of localhost? I tried to replace localhost with host's url:port (I tried number of ports)

but this is not working (even when I am connecting from Host1 itself).

Re: MySQL localhost database from another host 6 months, 1 week ago #824

  • sandhya
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
May be you need to add a user to the mysql users table that connects from the remote IP to tell MySQL it is OK to accept connections from that host as that user to the specified database.
  • Page:
  • 1
Time to create page: 2.16 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download