Install MySQL
- Extract the MySQL zip file to a temp directory and run “setup.exe”.
- Install MySQL to the default directory, or for the purposes of this manual to the “c:\mysql” directory.
- If running an older version of MySQL, start it by running “c:\mysql\bin\winmysqladmin.exe”. In more recent versions, this is not required.
- Stop the MySQL service.
- Edit your C:\MySQL\my.ini file
- Verify you don't have a sql-mode defined. If so, comment it out.
- You will need to apply the old client hack for user authentication to work with Cacti.
- Add the following to the [mysqld] sub-section:
#Use old password encryption method (needed for 4.0 and older clients). old-passwords
- Start the MySQL service.
- Set a password for the root user (if not set already during MySQL installation)
c:\> mysqladmin --user=root password somepassword c:\> mysqladmin --user=root --password reload
- Create the MySQL database:
c:\> mysqladmin --user=root --password create cacti
- Import the default Cacti database:
c:\> mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
Note: If you get any errors during this phase, you likely have sql-strict mode enabled or something else misconfigured in my.ini!
- Create a MySQL username and password for Cacti.
c:\> mysql --user=root --password mysql mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipw'; mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser'; mysql> flush privileges;








