mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove DB credentials from config.php
Better validation when config.php does not exist Update docs and quote password only populate legacy vars in config_to_json drop .travis.yml config copy remove credentials from config.php.default Check for existance of .env instead of config.php in python scripts legacy credential cleanup tiny cleanups consistent env for artisan server and artisan dusk
This commit is contained in:
@@ -28,22 +28,25 @@ Log files created by LibreNMS will be stored within this directory.
|
||||
|
||||
# Database config
|
||||
|
||||
These are the configuration options you will need to use to specify to get started.
|
||||
Set these variables either in .env or in the environment.
|
||||
|
||||
```php
|
||||
$config['db_host'] = '127.0.0.1';
|
||||
$config['db_port'] = 3306;
|
||||
$config['db_user'] = '';
|
||||
$config['db_pass'] = '';
|
||||
$config['db_name'] = '';
|
||||
```dotenv
|
||||
DB_HOST=127.0.0.1
|
||||
DB_DATABASE=librenms
|
||||
DB_USERNAME=DBUSER
|
||||
DB_PASSWORD="DBPASS"
|
||||
```
|
||||
|
||||
If you use a unix socket, you can specify it with these options:
|
||||
Use non-standard port:
|
||||
|
||||
```php
|
||||
$config['db_host'] = NULL;
|
||||
$config['db_port'] = NULL;
|
||||
$config['db_socket'] = '/run/mysqld/mysqld.sock';
|
||||
```dotenv
|
||||
DB_PORT=3306
|
||||
```
|
||||
|
||||
Use a unix socket:
|
||||
|
||||
```dotenv
|
||||
DB_SOCKET=/run/mysqld/mysqld.sock
|
||||
```
|
||||
|
||||
# Core
|
||||
|
@@ -531,20 +531,11 @@ menu similarly to device types.
|
||||
|
||||
If you've changed your database credentials then you will need to
|
||||
update LibreNMS with those new details.
|
||||
Please edit both `config.php` and `.env`
|
||||
|
||||
config.php:
|
||||
|
||||
```php
|
||||
$config['db_host'] = '';
|
||||
$config['db_user'] = '';
|
||||
$config['db_pass'] = '';
|
||||
$config['db_name'] = '';
|
||||
```
|
||||
Please edit `.env`
|
||||
|
||||
[.env](../Support/Environment-Variables.md#database):
|
||||
|
||||
```bash
|
||||
```dotenv
|
||||
DB_HOST=
|
||||
DB_DATABASE=
|
||||
DB_USERNAME=
|
||||
|
Reference in New Issue
Block a user