Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL on external server, access denied to valid user
    text
    copied!<p>My configuration is relatively simple. I have: </p> <ul> <li><p>a server running an API. </p></li> <li><p>This server connects to the database on a separate server. </p></li> <li><p>I can connect to the database from my PC using Sequel Pro by SSH to the API server, and then connecting to the database server from there. </p></li> <li><p>I can manually SSH in a terminal to the API server and connect to the database using the same userID and password from the MYSQL command line.</p></li> </ul> <p>However when my PHP script attempts to PDO_connect I get....</p> <pre><code>PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000] [1044] Access denied for user 'validusername'@'%' to database 'live'' in /var/www/live/community/backend/lib/Db/Connection.php:27 Stack trace: 0 /var/www/live/community/backend/lib/Db/Connection.php(27): PDO-&gt;__construct('mysql:host=10.2...', 'validusername', 'validPass', Array) 1 /var/www/live/community/backend/lib/Communication/Base.php(57): Changers_Db_Connection-&gt;__construct('10.248.174.31', 'live', 'validusername', 'validPass', NULL)\n 2 /var/www/live/factory/index.php(40): Communication_Base-&gt;useSourceConnection('10.248.174.31', 'live_licence', 'validusername', 'validPass') 3 {main}\n thrown in /var/www/live/community/backend/lib/Changers/Db/Connection.php on line 27 </code></pre> <p>Ubuntu servers using memcached. </p> <p>I am not concerned about the fatality of the error as it is pointless for the system to continue. I really need to understand why I can connect by every method except this one.</p> <p>Any advice appreciated.</p> <p>Regards Chris</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload