qualintitative / egoweb

This is a repository for EgoWeb 2.0 created and maintained by David P. Kennedy, a researcher at the non-profit RAND Corporation. The repository is also maintained by David Zhang a research programmer at RAND. EgoWeb is a modification of the software EgoNet, which was developed by Chris McCarty at the University of Florida.
http://www.qualintitative.com/wiki/doku.php/egoweb_2.0_home
30 stars 8 forks source link

Database Separation #12

Open michaelcford opened 7 years ago

michaelcford commented 7 years ago

So I have the product up and it is working fine. Next I need to separate the mysql database to a database server so I can secure the database behind a fire wall.
I exported the egoweb database to the database server. I opened my firewall between to two servers. I tested my connection between the application server and the dbserver. on the application server mysql -u egowebuser -p -h mysql.db.server connection good.

I then modified the connector string in main.php 'mysql:host=mysql.db.server;dbname-egoweb it then returns CDbConnection failed to open the DB connection.

I don't find any errors in the logfiles. any input would help.

michaelcford commented 7 years ago

Addendum : something with the php configuration as my simple process also fails but local host connects. <?php $mysqli = new mysqli('10.230.15.4', 'egowebuser', 'egowebpass'); if ($mysqli->connect_error) { die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error); } echo 'Connection OK'; $mysqli->close(); ?>

michaelcford commented 7 years ago

Never mind resolved: Cross domain requires Selinux change setsebool -P httpd_can_network_connect=1

http://stackoverflow.com/questions/27107881/cant-connect-to-remote-mysql-server-from-php

qualintitative commented 7 years ago

I'm glad you can trouble shoot this on your own as I would not be much help.