- Step 1: Edit the included INSTALL.mysql document:
- DELETE FROM mysql.db where db = 'syslog_server';
INSERT INTO mysql.db VALUES ('localhost','syslog_server','mysqlclient' . . .
The docsis_server needs to be able to create and delete tables
within the "syslog_server" database.
Change "syslog_server" to what you named your syslog database.
- DELETE FROM mysql.user;
This assumes you do not use the server for anything else
and have no other users currently installed. Might be wise
to check on that...
- INSERT INTO mysql.user VALUES ('localhost','root','', . . .
This allows the local root user to run sql queries.
- INSERT INTO mysql.user VALUES ('localhost','mysqluser',password("easy_password"), . . .
This allows the username and password configured in the /etc/docsis-server.conf
to access the database locally.
- INSERT INTO mysql.user VALUES ('1.1.1.%','mysqluser',password("easy_password"), . . .
If you have additional servers you need to allow them to connect remotely. If they
will be sending SYSLOG entries make sure you give them an entry in the mysql.db database as well.
- Make sure you create a username and password for the cable modem management platform you are using.
We currently use a very very custom way of choosing our config files, but I am hoping that future
versions will include an easy to use web interface to add modems and set the config files.
- Save the file with your username and passwords.
- Run the following commands (in bold)
[root@localhost docsis-server-1.0.2]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.56
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+------------+
| Database |
+------------+
| mysql |
+------------+
1 row in set (0.00 sec)
mysql> create database dhcp_server;
Query OK, 1 row affected (0.00 sec)
mysql> create database syslog_server;
Query OK, 1 row affected (0.00 sec)
mysql> quit
Bye
[root@localhost docsis-server-1.0.2]# mysql dhcp_server < INSTALL.mysql
[root@localhost docsis-server-1.0.2]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 3.23.56
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use dhcp_server;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_dhcp_server |
+-----------------------+
| config_nets |
| config_opts |
| cust_lease |
| deleted_leases |
| dhcp_log |
| dhcp_summary |
| docsis_update |
| docsismodem |
| sys_log |
| sys_summary |
| tftp_log |
| tftp_summary |
+-----------------------+
12 rows in set (0.01 sec)
mysql> quit
|
|