The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
[Howto] Connect Microsoft Azure MySQL with SSL - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.4 (https://userspice.com/forums/forumdisplay.php?fid=27) +--- Thread: [Howto] Connect Microsoft Azure MySQL with SSL (/showthread.php?tid=1426) |
[Howto] Connect Microsoft Azure MySQL with SSL - stonez56 - 04-09-2019 Hi all, This is my first post! Thanks for this great PHP user management framework. It saved me a lot of time to management users in my PHP application! For about a week, I tried to figure out how to connect MS Azure MySQL with SSL. Finally, I got it worked. And I am very happy to share this with you! Software versions:
1) In /users/init.php, update correct Azure Mysql User name, password, db name, and password: Code: // Set config 2) Download CA certifications here (BaltimoreCyberTrustRoot.crt.pem) from here and save it in your website. In my case, I saved this file at d:\home\site\wwwroot\ 3) Then, in /users/classes/DB.php, add two lines, in PDO connects as options around LINE 31: PDO::MYSQL_ATTR_SSL_CA => "d:\home\site\wwwroot\BaltimoreCyberTrustRoot.crt.pem", PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false Code: class DB { Then, you should be able to connect to Microsoft Azure MySQL with SSL enabled! Hope this is helpful to you! Stonez RE: [Howto] Connect Microsoft Azure MySQL with SSL - mudmin - 04-09-2019 Wow. That's fantastic. I will add this to the documentation. THANK YOU! RE: [Howto] Connect Microsoft Azure MySQL with SSL - stonez56 - 04-10-2019 (04-09-2019, 04:08 PM)mudmin Wrote: Wow. That's fantastic. I will add this to the documentation. THANK YOU! I'm glad that this is useful to someone and thanks for the great user management framework! |