Cacti (home)ForumsDocumentation

Install MySQL

  1. Extract the MySQL zip file to a temp directory and run “setup.exe”.
  2. Install MySQL to the default directory, or for the purposes of this manual to the “c:\mysql” directory.
  3. If running an older version of MySQL, start it by running “c:\mysql\bin\winmysqladmin.exe”. In more recent versions, this is not required.
  4. Stop the MySQL service.
  5. Edit your C:\MySQL\my.ini file
  6. Verify you don't have a sql-mode defined. If so, comment it out.
  7. You will need to apply the old client hack for user authentication to work with Cacti.
    1. Add the following to the [mysqld] sub-section:
      #Use old password encryption method (needed for 4.0 and older clients).
  8. Start the MySQL service.
  9. 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
  10. Create the MySQL database:
    c:\> mysqladmin --user=root --password create cacti
  11. 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!

  1. Create a MySQL username and password for Cacti.
    c:\> mysql --user=root --password mysql
    mysql> GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY 'cactipw';
    mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
    mysql> flush privileges;

Personal Tools