|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
help: mysql host
Is there anyway to find out the host of a mysql database by maybe running some type of php script with a function?
I have a free webspace provider with PHP and Mysql but it tells me to connect to the mysql databse with locahost as host. I want to link to this database from another domain and so I need the full host name and not just 'localhost'. Any help or comments would be appreciated. |
|
#2
|
|||
|
|||
|
well if that other domain is on the same webserver you could most likely login as normal. If the other website is on a different server, then most likely you will not be able to connect.
You could try to link the second site to the first site's database via 1st_webserver_ip:3306
__________________
-- Jason |
|
#3
|
|||
|
|||
|
If you can connect to the mysql server from your web pages with the localhost domain, then the mysql host is the same as your web site's host.
If your website is called example.com, then you just need to go to a shell or terminal prompt and type: ping example.com You will recieve the IP address which you can use in connecting to your mysql database remotely. Now, your second issue will be finding out if you have permissions set to connect to the mysql server remotely with your specific username. If your control panel is Cpanel, then you can modify this yourself... otherwise you will have to contact your web host to fix this for you. If your host does not allow this, contact me offline and I will direct you to one that does.
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > help: mysql host |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|