Install MySQL
MySQL 5.6 / 5.7
- Download the latest Generally Available MSI Installer from MySQL.com.
- Launch the MSI
- Agree to the license
- Setup Type - Select Server only
- Click Execute and wait until the installation has completed.
- Click Next to begin the Product Configuration
- Type and Networking Page:
- Config Type: Server Machine
- Connectivity: Leave the defaults selected (TCP, Port 3306, Open Firewall port for network access)
- Enable Show Advanced Options
- Click Next.
- Accounts and Roles Page:
- Specify a root password
- Skip the User Accounts section
- Click Next.
- Windows Service Page
- Leave all defaults enabled
- Click Next.
- Plugins and Extensions
- Leave all defaults disabled
- Click Next.
- Advanced Options
- Enable General Log
- Enable Slow Query Log
- Click Next.
- Apply Server Configuration page
- Click Execute.
- Validate all steps are green and were successful.
- Click Finish
- Click Next through the remaining screens.
MySQL 5.5
- Download the latest Generally Available MSI Installer from MySQL.com.
- Install MySQL using the Typical setup.
- Launch the MySQL Instance Configuration Wizard
- Select Detailed Configuration
- Select Server Machine
- Select Non-Transactional Database Only
- Select Online Transaction Processing (OLTP)
- Enable firewall exception for the port
- Disable SQL Strict Mode
- Select the correct character set for the region.
- Select Install As Windows Service
- Set a root password
- Edit my.ini file. Typically resides in \Program Files\MySQL\MySQL Server X.Y\
- Verify sql-mode is not defined. If so, comment it out.
- Verify the MySQL service is started.
- 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
Install TimeZone Database
- Download TimeZone database from: http://dev.mysql.com/downloads/timezones.html
- Extract file
- Import:
c:\> mysql --user=root --password mysql < C:\downloads\timezone_posix.sql
- Validate it works. The two queries below should return the same result in the form of central US time 2007-03-11 01:00:00
c:\> mysql --user=root --password mysql mysql> SELECT CONVERT_TZ('2007-03-11 2:00:00','US/Eastern','US/Central'); +------------------------------------------------------------+ | CONVERT_TZ('2007-03-11 2:00:00','US/Eastern','US/Central') | +------------------------------------------------------------+ | 2007-03-11 01:00:00 | +------------------------------------------------------------+ 1 row in set (0.01 sec) mysql> SELECT CONVERT_TZ('2007-03-11 3:00:00','US/Eastern','US/Central'); +------------------------------------------------------------+ | CONVERT_TZ('2007-03-11 3:00:00','US/Eastern','US/Central') | +------------------------------------------------------------+ | 2007-03-11 01:00:00 | +------------------------------------------------------------+ 1 row in set (0.00 sec)
Install Cacti Database
- Create the MySQL database:
c:\> mysqladmin --user=root --password create cacti
- Import the default Cacti database:
c:\> mysql --user=root --password cacti < C:\Inetpub\wwwroot\cacti\cacti.sql
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 [email protected] IDENTIFIED BY 'cactipw'; mysql> GRANT SELECT ON mysql.time_zone_name TO [email protected] IDENTIFIED BY 'cactipw'; mysql> flush privileges;