Time for action – creating the database

To keep it simple let's assume that you're going to host the database on the same server as Cacti.

  1. Execute the following command to logon to the MySQL CLI:
    mysql –u root mysql
    
  2. The default MySQL root account does not have a password set, so you can set one as follows:
    SET PASSWORD FOR root@localhost = PASSWORD('MyN3wpassw0rd');
    
  3. You can now also remove the example database, as it is not needed:
    DROP DATABASE test;
    
  4. Together with the example database, some example users may have been created. You can remove these with the following command:
    DELETE FROM user WHERE NOT (host = "localhost" AND user = "mydbadmin");
    
  5. On a CentOS distribution you can use the following command to guide you through the above steps:

Get Cacti 0.8 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.