How to change MySQL user’s password on Windows server

How to change the MySQL (Ver 8.0.33) user on Microsoft Windows Server (Windows Server 2022); the context for this is for the Jamf Pro Database user.

Command To Check What Version is installed

mysql -u root -p -V
mysql  Ver 8.0.33 for Win64 on x86_64 (MySQL Community Server - GPL)

Steps to change MySQL user on Windows server

1. Navigate to Jamf Application directory in one Command Window (CMD); remember to Right Click to run CMD as Administrative user
cd "C:\Program Files\JSS\bin>"

2. Run Command to Stop Server
jamf-pro server stop

Open A New Window for MySQL

3. Navigate to MySQL Application directory
cd "C:\Program Files\MySQL\MySQL Server 8.0\bin>"

4. Authenticate as Administrative user in MySQL
mysql -u root -p

5. Reset password
mysql>
ALTER USER 'username'@'localhost' IDENTIFIED BY 'Password123';

6. This may be needed, I did not use
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;

7. Flush MySQL Privileges
FLUSH PRIVILEGES;

8. Quit MySQL
QUIT;

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Share via
Copy link