kingsley ezenwa Posted December 2, 2020 Posted December 2, 2020 Looking into the database table `panel_databases` , I can see a column called `dbserver` with Values all Zero. My question is, where is that value set ? and what's it's use ? How would it function had it been set to 2 ? What happens should we have like 2 or more external databases (non localhost Databases) ; how do we allow customers utilize them. Does the value of `dbserver` correspond to something such as DataBase Server0, DataBase Server 1, .... Really need help with answers please. Thanks
1 d00p Posted December 2, 2020 Posted December 2, 2020 This is for theoretical use of multiple database servers yes. Has never really been tested or used (been there since syscp). You could define another database-server in lib/userdata.inc.php (note the index [0] for the root-access stuff); $sql_root[0]['caption']='Default'; $sql_root[0]['host']='127.0.0.1'; $sql_root[0]['user']='root'; $sql_root[0]['password']='your-db-root-pwd'; // another db server $sql_root[1]['caption']='DB Server #2'; $sql_root[1]['host']='10.0.0.30'; $sql_root[1]['user']='root'; $sql_root[1]['password']='your-db-root-pwd'; Even I never used that - so no idea whether this works as expected Feedback would be nice
0 kingsley ezenwa Posted December 2, 2020 Author Posted December 2, 2020 18 minutes ago, d00p said: This is for theoretical use of multiple database servers yes. Has never really been tested or used (been there since syscp). You could define another database-server in lib/userdata.inc.php (note the index [0] for the root-access stuff); $sql_root[0]['caption']='Default'; $sql_root[0]['host']='127.0.0.1'; $sql_root[0]['user']='root'; $sql_root[0]['password']='your-db-root-pwd'; // another db server $sql_root[1]['caption']='DB Server #2'; $sql_root[1]['host']='10.0.0.30'; $sql_root[1]['user']='root'; $sql_root[1]['password']='your-db-root-pwd'; Even I never used that - so no idea whether this works as expected Feedback would be nice without testing this, can say probability of this working is very very High. How do I know this; because I developed a custom built Framework which I use both personally and for some clients and this is very very similar to how I did it except that the array index e.g $sql_root[1] can be numeric or alphaNumeric. Thanks a lot; now I can go ahead with ma work.
Question
kingsley ezenwa
Looking into the database table `panel_databases` , I can see a column called `dbserver` with Values all Zero.
My question is, where is that value set ?
and what's it's use ?
How would it function had it been set to 2 ?
What happens should we have like 2 or more external databases (non localhost Databases) ; how do we allow customers utilize them.
Does the value of `dbserver` correspond to something such as DataBase Server0, DataBase Server 1, ....
Really need help with answers please.
Thanks
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now