Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
In order to set password for MySQL root user, after installation of mysql-server, change the authentication plugin into mysql_native_password.

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>
  • Loading branch information
Winson-Huang and mattwojo authored Sep 18, 2023
1 parent 54776a0 commit f7e56ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion WSL/tutorials/wsl-database.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Add or connect a database with WSL
description: Learn how to set up MySQL MongoDB, PostgreSQL, SQLite, Microsoft SQL Server, or Redis on the Windows Subsystem for Linux.
ms.date: 06/21/2023
ms.date: 09/18/2023
ms.topic: article
---

Expand Down Expand Up @@ -56,6 +56,13 @@ For more about working with MySQL databases, see the [MySQL docs](https://dev.my

To work with with MySQL databases in VS Code, try the [MySQL extension](https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2).

You may also want to run the included security script. This changes some of the less secure default options for things like remote root logins and sample users. This script also includes steps to change password for MySQL root user. To run the security script:

1. Start a MySQL server: `sudo service mysql start`
2. Start the security script prompts: `sudo mysql_secure_installation`
3. The first prompt will ask whether you’d like to set up the VALIDATE PASSWORD COMPONENT, which can be used to test the strength of your MySQL password. If you want to set some simple password, you should not set this component.
4. You will then set/change password for the MySQL root user, decide whether or not to remove anonymous users, decide whether to allow the root user to login both locally and remotely, decide whether to remove the test database, and, lastly, decide whether to reload the privilege tables immediately.

## Install PostgreSQL

To install PostgreSQL on WSL (ie. Ubuntu):
Expand Down

0 comments on commit f7e56ad

Please sign in to comment.