Jump to content

help connect to mysql database


needhelp123

Recommended Posts

I am developing a database based website and i have been using my pc as a server to test everything. but the thing is that i need to use a school server to host the website.

 

when i try to connect to the database on my computer using:

mysql_connect('localhost', 'mysql_user', 'mysql_password'); everything works fine, it connects and i can test the database. but when i login in to my school server through ssh, i am having trouble connecting to the database. so how do i go to connecting to that database? i guess using mysql_connect('localhost', 'mysql_user', 'mysql_password'); wouldn't work here because the host name should be something other than localhost?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.