For the complete documentation index, see llms.txt. This page is also available as Markdown.

๐Ÿ—„๏ธHow to install MySQL on Windows Server

MySQL is one of the most popular database systems. It works well with web applications, game servers, and CMS platforms like WordPress. Here is how to get it running on your Windows VPS.

Step 1: Download the MySQL Installer

  1. Open your browser on the VPS

  2. Download the MySQL Installer for Windows (the web version is fine, it downloads what it needs)

Step 2: Run the installer

  1. Double-click the downloaded file

  2. Accept the license terms

  3. Choose Developer Default if you want MySQL Workbench included, or Server only for a minimal setup

  4. Click Next and then Execute to download the required packages

Step 3: Configure MySQL Server

After the packages install, the configuration wizard opens:

  1. Type and Networking: Keep the defaults (Standalone MySQL Server, TCP/IP on port 3306)

  2. Authentication Method: Choose Use Strong Password Encryption

  3. Accounts and Roles: Set a strong root password. Write it down, you will need it

  4. Windows Service: Keep Configure as Windows Service checked. Set it to start automatically

  5. Click Next and then Execute to apply the configuration

Step 4: Verify the installation

Open Command Prompt or PowerShell:

You should see the MySQL version. Now test logging in:

Enter the root password. If you get the mysql> prompt, everything works.

Type exit to leave the MySQL prompt.

Step 5: Create a database and user

From the MySQL prompt, create a database for your application:

Step 6: Allow remote connections (optional)

If you need to connect to MySQL from another machine:

  1. Open the MySQL configuration file:

  1. Find the line:

  1. Change it to:

  1. Save the file and restart MySQL:

  1. Grant remote access to your user:

  1. Open port 3306 in Windows Firewall:

For better security, replace '%' with a specific IP address.

Step 7: Install MySQL Workbench (optional)

MySQL Workbench gives you a graphical interface for managing databases. It was included if you chose Developer Default. Open it from the Start menu, connect to localhost using the root account, and you can manage everything visually.

Using MySQL from PowerShell

Export a database:

Import a database:

Common issues

"MySQL service does not start" Open the Windows Event Viewer and check the Application logs for MySQL error messages. Common causes include port conflicts or incorrect configuration.

"Access denied" Make sure you are using the correct username and password. If you forgot the root password, you can reset it by starting MySQL with the --skip-grant-tables option.

Port 3306 not reachable Check that the Windows Firewall allows inbound TCP connections on port 3306. Also check with your hosting provider that the port is not blocked at the network level.

Useful commands

Conclusion

MySQL is installed and ready. You now have a full database server running on your Windows VPS, ready for web applications, game servers, or any other project that needs a database.

Last updated