Did you ever figure out a reason for why this is happening? When you say it does not work, does it time out? or does it give you some sort of numerical error such as a 404 error?
My first guess is that since server and localhost can be configured as different domains with the same IP address, it is possible that your server is setup to use phpmyadmin with the "localhost" domain, and there is nothing else on the "localhost" domain in Apache configured at the doc root. Then on your other "server" domain it might be possible that it is setup in Apache to point to a directory that has pages, but phpmyadmin is not configured as an alias of some sorts under that domain in the Apache configuration file which is why it will not work when using that domain.
Not sure if that makes any sense, but even though server and localhost both are pointing to the same computer (most likely), that doesn't mean they will serve the same identical things. Just like with virtual webhosting on the internet, many hosts can use one single ip address for all of their customers websites as each domain is set to use that IP, but Apache can distinguish the differences in the domain names. When someone visits a website the browser sets the "Host" header, and then Apache looks at this header field to determine what to do next as far as what part of the configuration it should be using and where the doc root is, aliases, and many other things that can change between domains. So when you goto localhost or server, a different host header would be sent from the browser and my guess is that you have them setup different in Apache.
Ozzu Hosting - Want your website on a fast server like Ozzu?