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
https://forums.phpfreaks.com/topic/218070-help-connect-to-mysql-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.