FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


can't access local mysqlserver. help plz!





burzum
so i want to use a php script which takes some info from my sql server and shows is to visitors the error i get is the following:

Warning: mysql_connect(): Host 'localhost.localdomain' is not allowed to connect to this MySQL server in /home/burzum/domains/mno.frih.net/public_html/playersonline.php on line 6
Coudn't connect to [127.0.0.1]

what have i done wrong? the script is fine cause lots of people use it but i can't....and i need it!

thz in advance
holadola
Did you set up your database correctly in Direct Admin?

It whould be easier to help if you put some of the code on the forum (don't forget to mask the password)

/hd
Bondings
burzum wrote:
so i want to use a php script which takes some info from my sql server and shows is to visitors the error i get is the following:

Warning: mysql_connect(): Host 'localhost.localdomain' is not allowed to connect to this MySQL server in /home/burzum/domains/mno.frih.net/public_html/playersonline.php on line 6
Coudn't connect to [127.0.0.1]

what have i done wrong? the script is fine cause lots of people use it but i can't....and i need it!

thz in advance

Your database settings are probably wrong. You need to change them to the settings of the database you created. (database name, username, password)
burzum
but the database is in my computer not in the webserver, should i configure it from cpanel and how to do that?
Bondings
burzum wrote:
but the database is in my computer not in the webserver, should i configure it from cpanel and how to do that?

Oh, now I understand. You need to change the host name then. Maybe try with the ip of your computer - where the database is located.

Localhost means that it searches on the same server, which isn't the case here.
burzum
i tried it same error, maybe i have to open ports?
like 3306?
misterdimiz
Why don't you upload your database in the Webserver.
I Think it is the right way.
burzum
the database is for a game which changes everytime someones do something in the game so i can have it there.

i just got a new error saying: try to upgrade yor sql server....but i have mysql 5 i put 4 and still the same...
burzum
should i do somethink in the localmysql or the directadmin panel so my webserver "sees" my local mysql?
Bondings
burzum wrote:
should i do somethink in the localmysql or the directadmin panel so my webserver "sees" my local mysql?

If the mysql server is on your own computer, then you need to connect to it from a php page. You don't have to setup anything at all on DirectAdmin.
grantmaster
Quote:
Warning: mysql_connect(): Host 'localhost.localdomain' is not allowed to connect to this MySQL server in /home/burzum/domains/mno.frih.net/public_html/playersonline.php on line 6
Coudn't connect to [127.0.0.1]
If (usr is being directed to this database)
then (doesn't he need to provide a IP address that is browsable by world)
not (127.0.0.1)
Daniel15
burzum wrote:
i just got a new error saying: try to upgrade yor sql server....but i have mysql 5 i put 4 and still the same...


The error is actually saying to update the MySQL client. This is because MySQL 4.1 and 5.0 use a different type of password encryption, which isn't compatible with most PHP scripts.

If you want to run the MySQL server, you'll need to use MySQL 4.0, NOT 4.1 or 5.0. Alternatively, if you really want to run MySQL 4.1 (I don't recommend it), then you'll need to run this SQL query using the MySQL command line client:
Code:
SET PASSWORD FOR 'user'@'host' = OLD_PASSWORD('password');

Where 'user' is the username (eg. 'root' or 'webuser'), 'host' is the host (almost always 'localhost') and 'password' is the password you want to use for the MySQL user.

(information sourced from http://dev.mysql.com/doc/refman/5.0/en/old-client.html)

P.S If you're hosting the database then why don't you host the whole site? Database access will be slow unless you can upload and download off the FriHost server pretty quickly.
burzum
it says dont have permission to access the mysql server with 4
any other ideas? thx for the help though
Daniel15
Is it an 'Access denied for user xxxx@216.32.85.170' or similar message?

If so, then you need to allow the user to connect from the FriHost IP address. I'm not sure how to do that, though. You'd need to look in the MySQL manual.

It'd be a lot easier if you just use the FriHost MySQL server, and faster too. Maybe you could work out a way to use the FriHost MySQL server in your program?
burzum
no it doesnt say access denied. it says dont have permission to enter this mysql server. the problem is that the database changes all the time so i can't put it in frihost.... Crying or Very sad Crying or Very sad
Related topics
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.