I need to make a secure connection using php to a remote mysql database. Do I need to install ssl certificates on both servers? Or just in the server where I have the mysql database?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on what you want to secure.
If you want to secure the communication between the user-agent (browser) to your web server, you need to set up a certificate on the web server.
If you want to secure the communication between the web server (the DB client) and the MySQL server, you need to set up a certificate on the MySQL server.
In addition, you could make the MySQL client (your PHP script) use a client-certificate to authenticate to the MySQL server. This might not be necessary if MySQL username/password are considered enough.