Unable to Import the default Cacti database

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
skv8995
Posts: 13
Joined: Wed Feb 26, 2020 2:44 pm

Unable to Import the default Cacti database

Post by skv8995 »

Hi,

I have installed Cacti 1.2.8 in Server 2019 Datacenter Edition
I have sucessfully create MYSQL database
I am facing an error when i try to import default cacti database
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqladmin --user=root --password cacti < C:\Apache2\Apache24\htdocs\cacti\cacti-1.2.8
Access is denied.

I looked for a solution and found that i need to disable MSQL strict mode incase it is enabled but I m unable to find my.ini file in MYSQL folder location (tried viewing the hidden files)

Can anyone help me regarding this?

Thanks!
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Unable to Import the default Cacti database

Post by camerabob »

You are using the wrong command to import. That command just sets the password for the MYSQL admin.
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqladmin --user=root --password cacti
The correct syntax should be
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root cacti -p < C:\Apache2\Apache24\htdocs\cacti\cacti-1.2.8\cacti.sql
(At least that's the command in Linux...)

Between the two, you will need to create the cacti database and assign privileges:
# mysql -u root -p
Enter password: YOUR-PASSWORD-HERE <--****replace with your own password, of course****
MariaDB [(none)]> create database cacti;
MariaDB [(none)]> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'cacti';
MariaDB [(none)]> GRANT SELECT ON mysql.time_zone_name TO cacti@localhost IDENTIFIED BY 'cacti';
MariaDB [(none)]> FLUSH privileges;
MariaDB [(none)]> quit;
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
skv8995
Posts: 13
Joined: Wed Feb 26, 2020 2:44 pm

Re: Unable to Import the default Cacti database

Post by skv8995 »

Thanks you! I successfully imported the default cacti database.
User avatar
camerabob
Cacti User
Posts: 386
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Unable to Import the default Cacti database

Post by camerabob »

Good to hear!
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests