Skip to main content
Topic: Connecting PHPRad to MySQL Server  (Read 6194 times) previous topic - next topic

Connecting PHPRad to MySQL Server

Hello everyone!

I have created a form using PHPRad and am struggling to connect this form to the database in MySQL Server.  It seems that there is an error using the construct function in which I have to specify the host, username, password, database, port, and charset.  Any suggestions?  Any and all help would be much appreciated!

Thanks

Re: Connecting PHPRad to MySQL Server

Reply #1
@carolg22‍ Please do not tamper with the function unless you know what you are trying to do. if you have issues with connecting to your database, please make sure the MySQL server credentials provided in the config.php are correct.

Re: Connecting PHPRad to MySQL Server

Reply #2
Hi @willvin Thank you for your reply.  I checked to make sure the credentials in the config.php are correct, and it seems they are, however I am receiving the same message.  This is the code that I am using in the models PDODb file:

public function __construct($type = mysql, $host = localhost, $username = root, $password = '', $dbname = sqlserver1, $port = 3308, $charset = utf8)

noting that the port I am using is not the default. 

Re: Connecting PHPRad to MySQL Server

Reply #3
@carolg22‍ please use the phprad app to set your MySql server credentials and port and publish it. Click on Publish and you will see the settings I am talking about.

 

Re: Connecting PHPRad to MySQL Server

Reply #4
I been having the same problem,  all entries on the field are correct.  I had to disable the SSL for the user to get it to work.  This might be fine for development, but like to know how to enable the SSL from the radphp side, so I don't expose any passwords.
thanks