Hello,
We have just set up a MySQL instance on Amazon Web Services and to connect to the database, I need to include a certificate (rds-combined-ca-bundle.pem). I could not see a place where I could reference this and without it, the connection isn’t accepted.
I do have a tunnel set up for FileZilla FTP but need to reference the .pem file for MySQL otherwise connections are refused. I can connect manually in PHP by using:
I tried updating this but unfortunately, I received the same error on connecting. To test my credentials I tried connecting manually outside of Wappler and that did work as long as I pointed to the local .pem file.
Which PHP version do you have on your server? Did you check the PHP documentation, there are several SSL options available and the required option depends on the type of certificate you have.
Try replacing PDO::MYSQL_ATTR_SSL_CA with PDO::MYSQL_ATTR_SSL_CAPATH or PDO::MYSQL_ATTR_SSL_CERT. With self-signed certificates it is useful to not verify it, setting PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT to false could help there.
Hello Patrick,
I’ve just renewed my subscription and tried this out. Unfortunately, I am still having connection issues - sorry. I am also unable to connect via sFTP to the webserver but I can raise a separate request for that.
I have tried adding the location of the ‘rds-combined-ca-bundle.pem’ in the new SSL CA Certificate box as shown below.
Hi Teodor,
That was quick Ok, so to clarify, if I update my local install to PHP 7.0.18+ I should then be able to connect to the MySQL on the host machine.
It is the same path I used when connecting via a manual script before so that should be ok. I am going to update my MAMP installation and try again later.
It seems that the Test Connection in the Connection dialog uses a different script to test the connection and the SSL params weren’t added there. Will update it for the next Wappler update.
Hi Patrick,
Firstly, I just noticed that I had local selected rather than remote so that was the main issue - doh.
I now think the database connection scripts being uploaded cannot be run in the remote environment because PHP is too old due to some legacy apps.
I’ve just setup an additional host and the connections are working fine there so the issue is not Wappler and the SSL update did work. Thanks for helping work this through.