Jump to content


Photo

Cant connect / access denied - I know its redundant, sorry


  • Please log in to reply
2 replies to this topic

#1 fairyfan

fairyfan
  • New Members
  • Pip
  • Newbie
  • 5 posts
  • LocationSomewhere out there

Posted 01 June 2003 - 08:16 PM

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

#2 fairyfan

fairyfan
  • New Members
  • Pip
  • Newbie
  • 5 posts
  • LocationSomewhere out there

Posted 01 June 2003 - 08:57 PM

This is the command line on line 55

if(!($mysql = mysql_connect($hostname, $username, $password))


maybe that will shed some extra light?

:?

#3 gizmola

gizmola
  • Administrators
  • Advanced Member
  • 4,664 posts
  • LocationLos Angeles, CA USA

Posted 01 June 2003 - 09:41 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users