Here are the steps to install MySQL community server on a windows machine.
- Download the MySQL Community server zip file from https://dev.mysql.com/downloads/mysql/
- Extract the file into a folder C:/mysql
- Now goto C:/mysql/bin and run ‘mysqld — initialize’, this will create a folder C:/mysql/data and initialize MySQL with necessary files
- Default Mysql 8 server now comes with a separate authentication mechanism that caused problems for me while connecting from spring boot so I create a file change_pwd.txt at C:/mysql/change_pwd.txt and content of the file is
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘root’;
5. Now run the mysqld process from C:/mysql/bin as
‘mysqld — init-file=C:/apps/mysql-8.0.26-winx64/change_pwd.txt’
This will start your msql server and you can now connect to it using the ‘mysql’ client command.