"The Cacti Database has not been initialized"
Moderators: Developers, Moderators
"The Cacti Database has not been initialized"
Has anybody just tried to install it in modern environment?
Everything is new, everything is up to date:
CentOS Linux release 7.6.1810
PHP Version 7.3.3
MySQL 8.0.15
mysqlnd 5.0.12
First I got errors trying to create database (mysql -uroot -p cacti < /pathcacti/cacti.sql)
ERROR 1231 (42000) at line 6: Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'
then
ERROR 1064 (42000) at line 1668: You have an error in your SQL syntax; ... near 'grouping char(2) NOT NULL default '',
at the end a nice page "The Cacti Database has not been initialized. Please initilize it before continuing."
Cacti Installation is definetely not up to date and as the result can't be installed.
Any suggestions? Should I downgrade something?
-----------------------------------------------------------
The Cacti Database has not been initialized. Please initilize it before continuing.
To initilize the Cacti database, issue the following commands either as root or using a valid account.
mysqladmin -uroot -p create cacti
mysql -uroot -p -e "grant all on cacti.* to 'someuser'@'localhost' identified by 'somepassword'" This syntaxis does not work anymore.
mysql -uroot -p -e "grant select on mysql.time_zone_name to 'someuser'@'localhost' identified by 'somepassword'" This syntaxis does not work anymore.
mysql -uroot -p cacti < /pathcacti/cacti.sql Does not work, syntaxis and Parameters are no longer compatible
Where /pathcacti/ is the path to your Cacti install location.
Change someuser and somepassword to match your site preferences. The defaults are cactiuser for both user and password.
NOTE: When installing a remote poller, the config.php file must be writable by the Web Server account, and must include valid connection information to the main Cacti server. The file should be changed to read only after the install is completed.
-----------------------------------------------------------
Everything is new, everything is up to date:
CentOS Linux release 7.6.1810
PHP Version 7.3.3
MySQL 8.0.15
mysqlnd 5.0.12
First I got errors trying to create database (mysql -uroot -p cacti < /pathcacti/cacti.sql)
ERROR 1231 (42000) at line 6: Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'
then
ERROR 1064 (42000) at line 1668: You have an error in your SQL syntax; ... near 'grouping char(2) NOT NULL default '',
at the end a nice page "The Cacti Database has not been initialized. Please initilize it before continuing."
Cacti Installation is definetely not up to date and as the result can't be installed.
Any suggestions? Should I downgrade something?
-----------------------------------------------------------
The Cacti Database has not been initialized. Please initilize it before continuing.
To initilize the Cacti database, issue the following commands either as root or using a valid account.
mysqladmin -uroot -p create cacti
mysql -uroot -p -e "grant all on cacti.* to 'someuser'@'localhost' identified by 'somepassword'" This syntaxis does not work anymore.
mysql -uroot -p -e "grant select on mysql.time_zone_name to 'someuser'@'localhost' identified by 'somepassword'" This syntaxis does not work anymore.
mysql -uroot -p cacti < /pathcacti/cacti.sql Does not work, syntaxis and Parameters are no longer compatible
Where /pathcacti/ is the path to your Cacti install location.
Change someuser and somepassword to match your site preferences. The defaults are cactiuser for both user and password.
NOTE: When installing a remote poller, the config.php file must be writable by the Web Server account, and must include valid connection information to the main Cacti server. The file should be changed to read only after the install is completed.
-----------------------------------------------------------
- camerabob
- Cacti User
- Posts: 386
- Joined: Fri Feb 10, 2017 2:45 pm
- Location: Long Island, New York, USA
- Contact:
Re: "The Cacti Database has not been initialized"
The syntax should be
mysql -u root cacti -p < (path_to_cacti_sql_installer)/cacti.sql
Notice the -p after cacti (which refers to the table name, not the password)
mysql -u root cacti -p < (path_to_cacti_sql_installer)/cacti.sql
Notice the -p after cacti (which refers to the table name, not the password)
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
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
Re: "The Cacti Database has not been initialized"
I'm going to get my own back on cb now ... I think you mean database namecamerabob wrote:The syntax should be
mysql -u root cacti -p < (path_to_cacti_sql_installer)/cacti.sql
Notice the -p after cacti (which refers to the table name, not the password)
The root user is normally used, though when I do things I prefer to use a specific cacti DB user which has full access over that one database and no others (I have many instances) and that way I know which once I am wiping out/reinstalling. If you have no password for that user, you would need to leave the -p off (which is the password option).
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: "The Cacti Database has not been initialized"
Thank you for your reply. But it is not the biggest problem.
I've managet to do all 4 mentioned steps, but I still have this page
"The Cacti Database has not been initialized.."
how to go further?
I've managet to do all 4 mentioned steps, but I still have this page
"The Cacti Database has not been initialized.."
how to go further?
Re: "The Cacti Database has not been initialized"
This would suggest that you are NOT pointing Cacti at the same database that you populated with the cacti.sql script. Makes sure your config.php is correct!
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: "The Cacti Database has not been initialized"
I thing the only way to install cacti is using older MySQL 5.6.
Already tried with 5.7, it works, but not everything (some mysql variables can not be changed as read-only).
Will try tomorrow with 5.6.
Semms like cacti does not support MySQL 8, we have to wait.
Already tried with 5.7, it works, but not everything (some mysql variables can not be changed as read-only).
Will try tomorrow with 5.6.
Semms like cacti does not support MySQL 8, we have to wait.
Re: "The Cacti Database has not been initialized"
I don't believe that there are any issues with MySQL 8 which shouldn't already be resolved on 1.2.2. If you can find any specific queries that are failing, we can look into it.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: "The Cacti Database has not been initialized"
Those Errors are deffinetely having place with MySQL 8:
After removing NO_AUTO_CREATE_USER:
Not saying, that syntaxis shown on page "The Cacti Database has not been initialized." is not supported in MySQL 8:
should be replacet with:
Code: Select all
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -p cacti < cacti.sql
Enter password: **********
ERROR 1231 (42000) at line 6: Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'
Code: Select all
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -p cacti < cacti.sql
Enter password: **********
ERROR 1064 (42000) at line 1668: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping char(2) default '',
t_unit_value char(2) default '',
unit_value cha' at line 38
Not saying, that syntaxis shown on page "The Cacti Database has not been initialized." is not supported in MySQL 8:
Code: Select all
mysql -uroot -p -e "grant all on cacti.* to 'someuser'@'localhost' identified by 'somepassword'"
Code: Select all
CREATE USER 'someuser'@'%' identified by 'somepassword';
GRANT ALL ON cacti.* TO 'cacti'@'%';
Re: "The Cacti Database has not been initialized"
OK, I will do some testing on that. I'm sure we had people running ion MySQL8
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: "The Cacti Database has not been initialized"
OK, so we did fix the issue above but only from the PHP code point of view:
https://github.com/Cacti/cacti/issues/2007
https://github.com/Cacti/cacti/issues/2007
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: "The Cacti Database has not been initialized"
What about second error?
The issue is more general and can be articulated as follows: "Cacti can't be installed in modern environment (PHP 7 / MySQL 8 )"
I believe a set of changes and Testing to be done. And more important - clear information on Website about compability,
so people does not have to spent days installing all possible versions of MySQL.
Code: Select all
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uroot -p cacti < cacti.sql
Enter password: **********
ERROR 1064 (42000) at line 1668: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping char(2) default '',
t_unit_value char(2) default '',
unit_value cha' at line 38
I believe a set of changes and Testing to be done. And more important - clear information on Website about compability,
so people does not have to spent days installing all possible versions of MySQL.
Re: "The Cacti Database has not been initialized"
Neither do we as this is all done in our spare hours
We do have people running on MySQL 8 which is why it is thought to be working. As you will have seen from the above fix, it appeared to work but with every release / patch, something else can break.
Just like we know there were big PHP 7.2 breaking changes we corrected in 1.2 that 1.1 doesn't handle.
We do have people running on MySQL 8 which is why it is thought to be working. As you will have seen from the above fix, it appeared to work but with every release / patch, something else can break.
Just like we know there were big PHP 7.2 breaking changes we corrected in 1.2 that 1.1 doesn't handle.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 1 guest