Code: Select all
FATAL: Connection to Cacti database failed. Please ensure:
the PHP MySQL module is installed and enabled.
the database is running.
the credentials in config.php are valid.
What we have done so far regarding MySQL is this:
Run “mysqladmin --user root --password=InitialPW password NewPW”
mysqladmin -u root -p create cacti1x
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
(dump the DB on the old server) mysqldump -l -u cactiuser -p --add-drop-table cacti1x > /usr/local/cacti1.2.2.sql
(import the DB to the new server) mysql –u root –p cacti1x < /usr/local/cacti1.2.2.sql
Create the cactiuser
mysql -u root –p
create user 'cactiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON cacti1x.* TO 'cactiuser'@'localhost';
GRANT SELECT ON mysql.time_zone_name to 'cactiuser'@'localhost';
flush privileges;