The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes how to create and manage the database that is used by the NLR manually, and includes the following section:
•Manually Creating and Managing the NLR Database
During normal installation, a script is used to automatically create the database used by the NLR. If the NLR is freshly installed with a default MySQL installation, no manual intervention is required. However, if the root user or password for MySQL has been changed from the default values, or if the NLR database needs to be reinstalled, the NLR database script Nlr_mysql.sh may need to be run manually.
The Nlr_mysql.sh script is used to create, remove, backup or restore the entire NLR database. This script requires MySql root access to set up the database and create the user credentials used by the RNC and NLR. The Nlr_mysql.sh script is located at /home/NlrUser/scripts.
On a new MySQL installation the root user is 'root' with no password. If only the password has been changed, a prompt will appear during NLR installation to request the MySql root user password, and there should be no need to run the script Nlr_mysql.sh script. For automated installs, where user input is not possible, or if a user other than 'root' is to be used, the file will have to be modified.
To modify the script Nlr_mysql.sh, perform the following procedure:
Procedure
Step 1 Open Nlr_mysql.sh in a text editor.
Step 2 Under "user setup" change the values specified for "ROOT_USER" and "DEFAULT_PW" to the correct MySql root login details.
This action creates the basic table structure used by the NLR.
Step 3 Enter any of the following arguments, where:
•create creates the database and users required to access the database.
•drop removes the database and users (all subscriber data will be lost).
•reinit executes a "drop" command, then a "create" command (all subscriber data will be lost).
•backup prints all database values to the Linux standard output.
•restore <filename> restores database from a file.
MySql users "NlrUser" and "RncUser" are created to access the NLR data. A standard installation should not need to modify this.
Note Advanced Users Only: The user names and hashed passwords are stored in the "DEFAULT_SQL_USERS" array in Nlr_mysql.sh. Changing these values will also necessitate changes to config.inc.php and the RNC configuration file.
Step 4 For manual database and user setup, run the script Nlr_mysql.sh with the "create" argument as follows:
/bin/sh /home/NlrUser/bin/Nlr_mysql.sh create