fairyfan Posted June 1, 2003 Share Posted June 1, 2003 I cannot connect to ANY database I make in the CPanel. Here is all the info: hostname - Localhost user - xxxxx_xxxxxx pass - xxxxxx db name - xxxxx_dbname error message via the script (auto table set up script -the script is trying to creat tables using the above user/pass) This is a php script that auto installs tables in the db for you. Now I do everything via my Control Panel on Linux. I dont think I need to give privilages (there is no spot on the Cpanel to do so either) as they are there if I try to create tables by hand via phpmyadmin. ::Installation :: Second step: Checking validity of data and creating tables. Warning: mysql_connect() [function.mysql-connect]: Can\'t connect to local MySQL server through socket \'/var/tmp/mysql.sock\' (2) in /home/username/public_html/script/scriptcall.php on line 55 The script tried to connect to the MySQL database, however it was impossible to establish connection. There are two cases why this happened. The first is that the MySQL server is not open. The second case is that you haven\'t set scriptcall.php variables correctly. Please, check the variables again Now I know the above variables are correct Now if I change the variables to the following: hostname - www.my-site.com user - xxxxx_xxxxx pass - xxxxx db name - xxxxx_dbname This is the error I get: Installation Second step: Checking validity of data and creating tables. Warning: mysql_connect() [function.mysql-connect]: Access denied for user: \'xxxxx-xx_xxxxx@ip address\' (Using password: YES) in /home/username/public_html/script/scriptcall.php on line 55 The script tried to connect to the MySQL database, however it was impossible to establish connection. There are two cases why this happened. The first is that the MySQL server is not open. The second case is that you haven\'t set scriptcall.php variables correctly. Please, check the variables again. Without giving out all my info here I hope I have given some of you sql gurus enough to go on as to why this is happening. Also, I dont think my hosting company is allowing me \"root\" access to the sql server. I am on a reseller acct. with WHM and can restart sql server but I dont know that I can do much more than that. Thanks you guys Kerr Quote Link to comment https://forums.phpfreaks.com/topic/534-cant-connect-access-denied-i-know-its-redundant-sorry/ Share on other sites More sharing options...
fairyfan Posted June 1, 2003 Author Share Posted June 1, 2003 This is the command line on line 55 if(!($mysql = mysql_connect($hostname, $username, $password)) maybe that will shed some extra light? :? Quote Link to comment https://forums.phpfreaks.com/topic/534-cant-connect-access-denied-i-know-its-redundant-sorry/#findComment-1795 Share on other sites More sharing options...
gizmola Posted June 1, 2003 Share Posted June 1, 2003 This is the command line on line 55 if(!($mysql = mysql_connect($hostname, $username, $password)) maybe that will shed some extra light? :? Try changing your host to localhost. Most servers are set up that way as a security measure. Quote Link to comment https://forums.phpfreaks.com/topic/534-cant-connect-access-denied-i-know-its-redundant-sorry/#findComment-1797 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.