Skip to content

Instantly share code, notes, and snippets.

@naveen521kk
Last active August 9, 2023 13:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naveen521kk/fea2dc21e09933795bc71b9add4676c6 to your computer and use it in GitHub Desktop.
Save naveen521kk/fea2dc21e09933795bc71b9add4676c6 to your computer and use it in GitHub Desktop.
This is a documentation on installing MySQL on Windows using Chocolatey

Install MySQL using Chocolatey on Windows

Installing Chocolatey

  • Go to https://chocolatey.org/install and follow the command there and paste it in an administrative Powershell Windows. Something like

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  • Then close the shell.

  • Open a new shell and type choco -? if you don't see any errors then chocolatey is installed.

Installing MySQL

  1. Again open an adminstrative powershell and the type the following command

    choco install mysql
  2. You may see some scary output in red you can safely ignore it. After that, you will successfully install MySQL.

  3. Then type the following commands

    choco install mysql-python
  4. Finally, if the commands don't show any error you can start working. You will see the Mysql command prompt in the start menu which you can start.

  5. You may need to restart your computer.

What is the MySQL password?

The default username would be root and the password will be blank. You can change the password once opening it by this command

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';

Where new_password is your new password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment