Chris W
Joined: 16 Jun 2006 Posts: 23
|
Posted: Mon Mar 05, 2007 9:16 am Post subject: [HOWTO] Upgrade cacti installation from MySQL 4.1 to 5.0 |
|
|
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. |
|