Skip to content

Installing MySQL

mnunesp edited this page Dec 2, 2017 · 3 revisions

Installing MySQL on Microsoft Windows

The easiest way to get MySQL is to use the top installer at https://dev.mysql.com/downloads/windows/installer/

The installer can also be reached by going to https://www.mysql.com/ then clicking on Downloads. Community. MySQl on Windows. and MySQL installer.

After downloading the installer, run it.

Click Next. Select Developer Default and click Next.

Click Yes if asked to skip missing extras. Click Execute to download all components. Click Next. Click Next. Click Next. Click Next.

Enter a password for MySQL at the top. We will use this connect to the server. Add a User at the bottom. This will be you. Click Next.

Uncheck run at startup if desired (This is recommended unless you will be working 24/7). Click Next. Click Next. Click Execute. Click Finish. Click Next. Click Finish. Click Next. Click Check. Click Next. Click Execute. Click Finish. Click Next. Click Finish.

Running and stopping the server on Windows

If you just installed MySQL the server should already be running. Unchecking "run at startup" during installation will require you to start the server manually when you boot your computer. To start or stop the server, go to your taskbar in the bottom right and click on the MySQL Notifier, go to MySQL57, and click on either Start or Stop.

Creating the database

Open the MySQL Shell that was installed and enter: \sql to switch to sql mode. \connect root@localhost; to connect to the server. Enter your password created during installation. \create database pelliodb;. \show databases; and check if pelliodb has been created.

Downloading mysqlclient

Lastly, you will need mysqlclient for Django to actually access the database. In the command line enter: pip3 install mysqlclient

Clone this wiki locally