473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Access Denied (using password 'YES')

40
Hi all,

I've got a mySQL database I've been working with as my localhost for several months now, no connection problems. I'm at the point however, where I need to connect to the database from another site / different IP address.

I'm playing around in the PayPal sandbox, and I'm running an instant payment notification php script before the user exits. The included connection file looks like this:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $hostname_TFATP = 'mywebsite.com';  // (used to be localhost)
  3. $database_TFATP = 'mydatabase_TFATP';
  4. $username_TFATP = 'mydatabase_danny';
  5. $password_TFATP = 'christmas123';
  6. $TFATP = mysql_pconnect($hostname_TFATP, $username_TFATP, $password_TFATP) or trigger_error(mysql_error(),E_USER_ERROR); 
  7. ?>
So far so good, right? My ipn.php script runs fine until it gets to the point where it needs to connect to my database. Then, in the error log, I see the following:

PHP Warning: mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: Access denied for user 'mydatabase_danny'@'gator306.hostgator.com' (using password: YES) in /home/mydatabase/public_html/Connections/TFATP_paypal.php on line 9


So I read up on this. I find out I need to allow the host access to my database, so I go into the ACCESS HOSTS portion of the mySQL account maintenance and I add the following address: 66.135.197.% All PayPal addresses start with 66.135.197 and I throw the wild card in at the end. But I still get the error.

Someone suggested I make sure there was no 'bind' address in my mySQL config file, but I couldn't find that file. So I called HostGator (my host) and asked them about it. They assured me they don't use binds, so that was a dead end.

For giggles I decided to temporarily allow ALL addresses access to my database by entering all wildcards of %.%.%.% under the access hosts. When I ran through the process this time, I got a different error:

[20-Dec-2007 11:38:21] PHP Fatal error: Call to undefined function: dbquery() in /home/mydatabase/public_html/include/paypal/ipn.php on line 27

The lines leading up to line 27 of that script look like this:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. line 20        require_once('../../Connections/TFATP_paypal.php');
  3. line 21
  4. line 22          // check that the invoice has not been previously processed
  5. line 23         $sql = "SELECT status
  6. line 24         FROM tbl_order
  7. line 25         WHERE order_id = {$_POST['invoice']}";
  8. line 26
  9. line 27         $result = dbQuery($sql);
?>

Does this mean it got past the connect part and blew up on the dbquery? Can I safely assume it connected?

Can anyone offer up any other solution to my connection problem, other than wildcarding the entire world access to my database? Because that's just not gonna fly.

Thanks in advance!
Dec 20 '07 #1
0 1749

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bruno | last post by:
NEWBIE I have make a mistake using mysqlcc; now, user (mysql,root,bruno) can't acces to databases. I use both mysqlcc & phpMyAdmin but the answer is access denied root@192.168.1.102 (Using...
0
by: Ryan Schefke | last post by:
------=_NextPart_000_0077_01C34C8B.2B90C960 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ..I just sent this out to the win32 distribution list but no one has...
0
by: Morten Gulbrandsen | last post by:
Hi programmers, Good morning ;-) I think something is wrong, Running windows I believe first I have to set some password, Which creates some user, Then I can grant the required privileges, for...
0
by: Ike_strong | last post by:
Can anyone help me to figure out why each time I try to access my database using: c:\mysql\bin\inmysql -root -p and afterwards:(i.e. after inputting my at the password prompt) Enter...
8
by: John | last post by:
Hello. I am currently working through a book on Dreamweaver and using PHP. I am having a little trouble with setting up the database though. I have php 4.2.3 and MySQL 4.0.20a. I am running...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
2
by: Shailesh Gajare | last post by:
Hi All, I have creating an ASP.Net application with two web servers. I am uploading a file which is being uploaded on one of the server, I want to copy the uploaded file on the other server at the...
0
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then, Process.Start throws an Access is Denied Exception. This is with .NET 2.0, of course...
7
by: rajbala.3399 | last post by:
Hi , I want to download sql in my linux system........... # rpm -ivh MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl ient-5.0.24a-0.glibc23.i386.rpm Preparing... ...
2
by: benicio | last post by:
i got this error after uploading all the files in www folder. i'm using wamp. Warning: mysql_connect() : Access denied for user 'root'@'localhost' (using password: YES) in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.