gravereaper Posted December 1, 2006 Share Posted December 1, 2006 'Warning: mysql_connect() [function.mysql-connect]: Host 'MYHOST is not allowed to connect to this MySQL server in D:\xampplite\htdocs\test\hi.php on line 2Could not connect: Host 'MYHOST' is not allowed to connect to this MySQL server' When i try to execute the following code: <?php$con = mysql_connect("rehan","Root"," ");if (!$con) { die('Could not connect: ' . mysql_error()); }// Create databaseif (mysql_query("CREATE DATABASE my_db",$con)) { echo "Database created"; }else { echo "Error creating database: " . mysql_error(); }// Create table in my_db databasemysql_select_db("my_db", $con);$sql = "CREATE TABLE Person (FirstName varchar(15),LastName varchar(15),Age int)";mysql_query($sql,$con);mysql_close($con);?> Need help to bypass this.. Link to comment Share on other sites More sharing options...
justsomeguy Posted December 1, 2006 Share Posted December 1, 2006 You can't "bypass" it, it's a security setting in MySQL. You have to change the setting. MySQL can be setup to either allow remote connections or not, so it's probably set to deny remote connections. It might be able to accept connections from certain hosts, I haven't tried that. Link to comment Share on other sites More sharing options...
gravereaper Posted December 2, 2006 Author Share Posted December 2, 2006 Which variable do i need to edit for that and where is that variable located?EDIT: Ok i've found the my.cnf configuration file, now which variable shall i edit to avoid getting this error. Link to comment Share on other sites More sharing options...
justsomeguy Posted December 4, 2006 Share Posted December 4, 2006 http://www.google.com/search?client=opera&...-8&oe=utf-8 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now