Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[HOWTO] Upgrade cacti installation from MySQL 4.1 to 5.0

 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
Chris W



Joined: 16 Jun 2006
Posts: 23

PostPosted: Mon Mar 05, 2007 9:16 am    Post subject: [HOWTO] Upgrade cacti installation from MySQL 4.1 to 5.0 Reply with quote

I had a lot of trouble with permissions going from MySQL 4.1 to 5.0. I thought I'd be okay by just using mysqldump on the mysql and cacti databases from MySQL 4.1 and importing them to 5.0, but as soon as I'd try and load cacti I'd get this error message:

Quote:
Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:

mysql -u cactiuser -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.


I think MySQL 5.0 handles users quite a bit differently than it does in MySQL 4.1. But anyway, here is what you need to correctly set permissions in MySQL 5.0 so that cacti works:

Code:
grant CREATE,INSERT,SELECT,DELETE,UPDATE on cacti.* to cactiuser@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> grant CREATE,INSERT,SELECT,DELETE,UPDATE on cacti.* to cactiuser;
Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR cactiuser@localhost = old_password('supersecretpassword');
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected, 1 warning (0.00 sec)


After that, you should be good to go! This is with MySQL-5.0.27 and cacti-0.8.6j. As you can see, my cacti user's name is cactiuser, and the cacti user's password is supersecretpassword.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group