Cacti CentOS 2 – Creating The Mysql Database

Cacti CentOS 2 – Creating The Mysql Database

Creating The Mysql Database

The next step in the installation isto create the mysql database for cacti and import the cacti schema.

To create the database perform the following steps :-

  • Logon to mysql as the root user
  • In the mysql command prompt execute the command below to create the cacti database :-

create database cacti;

  • In the mysql command prompt execute the command below to create the user and assign permissions to the cacti database :-

GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘<Your Password>’;

  • In the mysql command prompt execute the commands below toflush the privileges and exit :-

flush privileges;
quit

Import The Cacti Schema

The last step in creating the mysql database is to import the cacti schema.  To import the schema perform the following steps :-

  • In the command prompt execute the following command

mysql cacti -u cactiuser -p<Your Password> < /var/www/cacti/cacti.sql