Welcome Guest, Not a member yet? Register   Sign In
Secure transport for remote database connection
#1

Hi Everyone,

I'm trying to connect my CodeIgniter app to a remote database and from the database side I have the following:

require_secure_transport = on




So I therefore would like to be advise how to tell my app to connect the remote database using secure transport.

Currently I get the following error:

Error: Unable to connect to MySQL.
Debugging errno: 3159
Debugging error: Connections using insecure transport are prohibited while --require_secure_transport=ON.

I tried to modify the config/database.php file but was not sure what to change or add.

Your help will be highly appreciated
Reply
#2

@aforica,

What version of CI are you using? Can you show us your db configuration code (without revealing any links and passwords)?
Reply
#3

@php_rocs,

As you requested here are the info below:

CI version - 3.1.11

Database snapshot - https://filedn.com/lL8lDt3x0NmXCyz0AN5ttCR/snapshot.png
Reply
#4

So at the moment, in order for me to connect I had to disable this: (require_secure_transport = on) from the db server and the connection was successful but I will be turning it on again as soon as I get help.
Reply
#5

(07-30-2020, 02:25 PM)aforica Wrote: So at the moment, in order for me to connect I had to disable this: (require_secure_transport = on) from the db server and the connection was successful but I will be turning it on again as soon as I get help.
Hi Everyone,

Is there any update on this?

Thanks,
Raja.
Reply
#6

You need to read this.

5.1 Configuring MySQL to Use Encrypted Connections
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

Hi,
Thank you for your question. In order to connect to a remote database using secure transport, you will need to set the connection URL in your code to use HTTPS instead of HTTP. For example, if your database is hosted at 'example.com', you would use the following URL:
mysql://username:[email protected]/database_name
Please let us know if you have any other questions.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB