Cannot connect to the mySQL database from cloud foundry app
up vote
0
down vote
favorite
I can connect to the mySQL db using MAMP and install directus as expected locally. When trying to install directus using a local apache server from Terminal I have to do a manual installation. When I try to install directus from my deployed app on cloud foundry, I cannot reach the mySQL db. I click the save button on the database connection page and the spin wheel appears for a few seconds but nothing happens. I get a 500 error. When I create the api.php file in cloud foundry, I get the message can't connect to database on the login page. mod_rewrite is enabled as well as the appropriate extensions. Any help is much appreciated, thanks.
edit: here is the JSON response I am getting:
code: 11 message: Failed to connect to the database Connect Error:
SQLSTATE[HY000] [2002] Connection refused
class: DirectusDatabaseExceptionConnectionFailedException file:
directus/src/core/Directus/Application/CoreServicesProvider.php
line: 702
mysql pivotal-cloud-foundry
add a comment |
up vote
0
down vote
favorite
I can connect to the mySQL db using MAMP and install directus as expected locally. When trying to install directus using a local apache server from Terminal I have to do a manual installation. When I try to install directus from my deployed app on cloud foundry, I cannot reach the mySQL db. I click the save button on the database connection page and the spin wheel appears for a few seconds but nothing happens. I get a 500 error. When I create the api.php file in cloud foundry, I get the message can't connect to database on the login page. mod_rewrite is enabled as well as the appropriate extensions. Any help is much appreciated, thanks.
edit: here is the JSON response I am getting:
code: 11 message: Failed to connect to the database Connect Error:
SQLSTATE[HY000] [2002] Connection refused
class: DirectusDatabaseExceptionConnectionFailedException file:
directus/src/core/Directus/Application/CoreServicesProvider.php
line: 702
mysql pivotal-cloud-foundry
sounds like probably your connection details are wrong or the database is not running
– ADyson
Nov 19 at 20:49
I am able to connect locally using the exact same api.php file. Something is different between my local environment and my cloud setup. I cannot pinpoint what is causing the connection issue.
– hellmaca
Nov 19 at 21:03
yes, like I said, probably the connection details are not right in the other environment. Check where the database is actually located in that environment, and whether it's running
– ADyson
Nov 19 at 21:05
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I can connect to the mySQL db using MAMP and install directus as expected locally. When trying to install directus using a local apache server from Terminal I have to do a manual installation. When I try to install directus from my deployed app on cloud foundry, I cannot reach the mySQL db. I click the save button on the database connection page and the spin wheel appears for a few seconds but nothing happens. I get a 500 error. When I create the api.php file in cloud foundry, I get the message can't connect to database on the login page. mod_rewrite is enabled as well as the appropriate extensions. Any help is much appreciated, thanks.
edit: here is the JSON response I am getting:
code: 11 message: Failed to connect to the database Connect Error:
SQLSTATE[HY000] [2002] Connection refused
class: DirectusDatabaseExceptionConnectionFailedException file:
directus/src/core/Directus/Application/CoreServicesProvider.php
line: 702
mysql pivotal-cloud-foundry
I can connect to the mySQL db using MAMP and install directus as expected locally. When trying to install directus using a local apache server from Terminal I have to do a manual installation. When I try to install directus from my deployed app on cloud foundry, I cannot reach the mySQL db. I click the save button on the database connection page and the spin wheel appears for a few seconds but nothing happens. I get a 500 error. When I create the api.php file in cloud foundry, I get the message can't connect to database on the login page. mod_rewrite is enabled as well as the appropriate extensions. Any help is much appreciated, thanks.
edit: here is the JSON response I am getting:
code: 11 message: Failed to connect to the database Connect Error:
SQLSTATE[HY000] [2002] Connection refused
class: DirectusDatabaseExceptionConnectionFailedException file:
directus/src/core/Directus/Application/CoreServicesProvider.php
line: 702
mysql pivotal-cloud-foundry
mysql pivotal-cloud-foundry
edited Nov 20 at 13:56
asked Nov 19 at 19:59
hellmaca
186
186
sounds like probably your connection details are wrong or the database is not running
– ADyson
Nov 19 at 20:49
I am able to connect locally using the exact same api.php file. Something is different between my local environment and my cloud setup. I cannot pinpoint what is causing the connection issue.
– hellmaca
Nov 19 at 21:03
yes, like I said, probably the connection details are not right in the other environment. Check where the database is actually located in that environment, and whether it's running
– ADyson
Nov 19 at 21:05
add a comment |
sounds like probably your connection details are wrong or the database is not running
– ADyson
Nov 19 at 20:49
I am able to connect locally using the exact same api.php file. Something is different between my local environment and my cloud setup. I cannot pinpoint what is causing the connection issue.
– hellmaca
Nov 19 at 21:03
yes, like I said, probably the connection details are not right in the other environment. Check where the database is actually located in that environment, and whether it's running
– ADyson
Nov 19 at 21:05
sounds like probably your connection details are wrong or the database is not running
– ADyson
Nov 19 at 20:49
sounds like probably your connection details are wrong or the database is not running
– ADyson
Nov 19 at 20:49
I am able to connect locally using the exact same api.php file. Something is different between my local environment and my cloud setup. I cannot pinpoint what is causing the connection issue.
– hellmaca
Nov 19 at 21:03
I am able to connect locally using the exact same api.php file. Something is different between my local environment and my cloud setup. I cannot pinpoint what is causing the connection issue.
– hellmaca
Nov 19 at 21:03
yes, like I said, probably the connection details are not right in the other environment. Check where the database is actually located in that environment, and whether it's running
– ADyson
Nov 19 at 21:05
yes, like I said, probably the connection details are not right in the other environment. Check where the database is actually located in that environment, and whether it's running
– ADyson
Nov 19 at 21:05
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
I had to use the IP address instead of the p-mysql... string to connect to the DB. It was a PCF problem and not directus. Thanks for the support @ADyson
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I had to use the IP address instead of the p-mysql... string to connect to the DB. It was a PCF problem and not directus. Thanks for the support @ADyson
add a comment |
up vote
1
down vote
I had to use the IP address instead of the p-mysql... string to connect to the DB. It was a PCF problem and not directus. Thanks for the support @ADyson
add a comment |
up vote
1
down vote
up vote
1
down vote
I had to use the IP address instead of the p-mysql... string to connect to the DB. It was a PCF problem and not directus. Thanks for the support @ADyson
I had to use the IP address instead of the p-mysql... string to connect to the DB. It was a PCF problem and not directus. Thanks for the support @ADyson
answered Nov 20 at 13:53
hellmaca
186
186
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53381788%2fcannot-connect-to-the-mysql-database-from-cloud-foundry-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
sounds like probably your connection details are wrong or the database is not running
– ADyson
Nov 19 at 20:49
I am able to connect locally using the exact same api.php file. Something is different between my local environment and my cloud setup. I cannot pinpoint what is causing the connection issue.
– hellmaca
Nov 19 at 21:03
yes, like I said, probably the connection details are not right in the other environment. Check where the database is actually located in that environment, and whether it's running
– ADyson
Nov 19 at 21:05