Index
» Projects
» phpMyEdit
» Forum
» can't use localhost as hostname |
|
richard simmons
Joined: 07 Oct 2011
Posts: 1
Posted: 2011-10-07 11:23
Back to top
Reply with quote
|
This is very odd. I have a mySql database in a commercial server. In order to test I put the open source version of phpMyEdit on my desktop computer which has Apache on it. I pointed phpMyEdit to the mySql database and it all worked fine.
I then loaded phpMyEdit to my web server which is at the same address as the mySql database. I ran the phpMyEdit setup with the same data - but with 'localhost' as the hostname and it can't attach to the database.
I tried the following tests
1. I tried all hostnames that the database server might be called: 127.0.0.1, localhost, it's actual IP address, and it's full url as used when it worked from my desktop Apache server. None worked.
2. I tried using the <table name>.php file that worked on my server and putting that file on the remote server and changing the database name to 'localhost' - that did not work
3. I wrote a small php program to access the database - in order to make sure that php scripts on the remote server could see the database and the script worked fine.
The mySql server is commercially hosted on a server with a cpanel interface.
Help Please....
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2011-10-07 15:31
Back to top
Reply with quote
|
Look for typo's in the user name and/or password, or delete an re-create users on both systems. When I've encountered what you describe, I've usually found that I've had typo one place or the other (db name, user name, or password).
|
Post new topic
Reply to topic
|
|
|
|