popmotsy Posted March 18, 2009 Share Posted March 18, 2009 hii,,I m using shared web hosting,,i m creating a installer script to create database on remote server,,but i always get the warning mesg,, ,,Access denied for user 'user'@'host' (using password: NO) in xxxxxxxx installer.php on line 14 Cannot Connected With Database..... can any one know abt this problem,,,please suggest me the proper solution.... thanks.. Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/ Share on other sites More sharing options...
Daniel0 Posted March 18, 2009 Share Posted March 18, 2009 Your username and/or password is wrong or that particular user is not allowed to login from the server where your script is. Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787432 Share on other sites More sharing options...
popmotsy Posted March 18, 2009 Author Share Posted March 18, 2009 thanks for replying,,,,,, but is there any wayy to allow that user to login from the server where the script is,,,,,, thankss,,,,, Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787442 Share on other sites More sharing options...
Daniel0 Posted March 18, 2009 Share Posted March 18, 2009 Yeah. Do you have some sort of control panel you are managing your MySQL server with, or are you using the CLI console? Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787445 Share on other sites More sharing options...
popmotsy Posted March 18, 2009 Author Share Posted March 18, 2009 hiiii.... well i told that ,,,i m using shared web hosting,,,and control panel is not provided with that,,,i m just using php script just like that,,,,, <?php $sql[]="create database xxxxx_database"; $host = "hostname"; $user = "username"; $dbpassword = "password"; $connection = mysql_connect($host, $user, $dbpassword) or die("Cannot Connected With Database"); mysql_select_db("cpv_database", $connection) or die("Database is not selected"); for($i=0;$i<count($sql);$i++) { $result = mysql_query($sql[$i]) or die('<li>$sql :'.$sql[$i].mysql_error()); echo '<li>'.$i.'sql to run -->:'.$sql[$i].'<br />'; } ........ and run on the server ,,,and i got that damn warning again and againn.... >... Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787473 Share on other sites More sharing options...
Daniel0 Posted March 18, 2009 Share Posted March 18, 2009 You'll have to contact your host to get them to set the permissions then. Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787475 Share on other sites More sharing options...
popmotsy Posted March 18, 2009 Author Share Posted March 18, 2009 permission for creatin database,,,,,???? Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787483 Share on other sites More sharing options...
Daniel0 Posted March 18, 2009 Share Posted March 18, 2009 Permission to connecting. It's probably set to only allow connections from localhost. Again, you'll have to contact your host if you cannot change the permissions yourself. Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787485 Share on other sites More sharing options...
popmotsy Posted March 18, 2009 Author Share Posted March 18, 2009 well....thanks for help...hope that will solve my issue..... Link to comment https://forums.phpfreaks.com/topic/149934-probling-when-create-databse-on-remote-server/#findComment-787515 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.