Jump to content

BigBill

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

BigBill's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Read only on the entire table. A reporting application also connects to this server with this user name and has no problems.
  2. Sorry, I may have edited what I said a bit to make it more clear. The EXACT output from my web server is: The entire code in the file is: <?php mysql_connect ("mydomain.com","WebUser","password") or die ("Couldn't connect with database!"); ?>
  3. Hello, When trying to use mysql_connect to a database that is on a different server than the web server, I get the following error: "Access denied for user 'WebUser'@'mydomain.com' (using password: YES)" Here is my code, it's pretty simple and very vanilla: mysql_connect ("myhost.com","WebUser","password") or die ("Couldn't connect with database!"); I'm not a newbie, and so yes, my username and password are correct. The permissions on the host are currently set to '%', so any IP address should be able to connect. I have tried explicity stating port 3306, and I can assume it is open because otherwise I would receive a timeout message. I can log into the database using the mysql client. Does anyone have any idea? All I can find on the net are posts from people who have never used a computer before. Even if you don't know, do you know any way that I can get PHP to return an error that is a little more specific???
  4. OK, I have found that it isn't the location of the SSL certificates. When I change the path to something that doesn't exist I get an error saying "SSL certificate error", so that rules that out. But I am still having no luck. In desperation, I uploaded the code to my web server and tried it out there. Now things are even more confusing. When I try to run the page it just hangs and doesn't open at all - not even if I leave it for 15 minutes. Here is the code: define ("HOST","mydomain.com"); define ("USER","WebUser"); define ("PASSWORD","password"); define ("DATABASE","Database"); echo phpinfo(); $mysqli = mysqli_init(); if (!$mysqli) { die('mysqli_init failed'); } $mysqli->ssl_set('/etc/ssl/client-key.pem','/etc/ssla/client-cert.pem', '/etc/ssla/ca-cert.pem',NULL,NULL); if (!$mysqli->options(MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT = 0')) { die('Setting MYSQLI_INIT_COMMAND failed'); } if (!$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 5)) { die('Setting MYSQLI_OPT_CONNECT_TIMEOUT failed'); } if (!$mysqli->real_connect(HOST, USER, PASSWORD, DATABASE, NULL, NULL, MYSQLI_CLIENT_SSL)) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } If I remove the MYSQLI_CLIENT_SSL flag I get the error message "Connect Error (1045) Access denied". If I put the flag in the page just hangs and never loads. What could be wrong? I mean, this code was copied and pasted straight out of the PHP documentation!
  5. Hello, I have a very frustrating problem. I have some php code that needs to connect to a MySQL database on another server. The connection needs to be through SSL. When I go to connect I get this error message: Connect Error (1045) Access denied for user 'WebUser'@'mydomain.com' (using password: YES) I have checked that I can log in with WebUser using another client program. I am worried that PHP is not finding my SSL certificates. For testing purposes I am running the PHP server from my windows machine, and have the path for the certificates as "C:\temp\client-key.pem" etc. Does anyone else think this is the problem?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.