mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Added config option for database port (#5517)
This commit is contained in:
committed by
Neil Lathwood
parent
46003a39b6
commit
5dd030f438
@@ -34,6 +34,9 @@ $config['db']['extension'] = 'mysqli';//mysql and mysqli available
|
||||
// MySQL Debug level
|
||||
$config['mysql_log_level'] = 'ERROR';
|
||||
|
||||
//MySQL port
|
||||
$config['db_port'] = 3306;
|
||||
|
||||
// What is my own hostname (used to identify this host in its own database)
|
||||
$config['own_hostname'] = 'localhost';
|
||||
|
||||
|
@@ -97,7 +97,7 @@ if ($config['memcached']['enable'] === true) {
|
||||
|
||||
if (!module_selected('nodb', $init_modules)) {
|
||||
// Connect to database
|
||||
$database_link = mysqli_connect('p:' . $config['db_host'], $config['db_user'], $config['db_pass']);
|
||||
$database_link = mysqli_connect('p:' . $config['db_host'], $config['db_user'], $config['db_pass'], null, $config['db_port']);
|
||||
if (!$database_link) {
|
||||
echo '<h2>MySQL Error</h2>';
|
||||
echo mysqli_connect_error();
|
||||
|
Reference in New Issue
Block a user