Installing and Setting Up MySQL

Step by step guide for installing MySQL and setting it up for use with Shoko Server.

Why MySQL Over SQLite

MySQL is the mid-tier database option that allows users to further fine-tune their database to achieve quicker response times. MySQL is perfect for users with experience using MySQL or those looking for an alternative to SQLite and are not afraid to perform additional configuring

Download

MySQL is available in many different versions, for use with Shoko Server you’ll want to download MySQL Community Server which is free to download. There are two available downloads.

Name Description
mysql-installer-web-community-5.7.11.0.msi Web installer, will download all needed files.
mysql-installer-community-5.7.11.0.msi Complete installer, includes all files.

Installing MySQL Community Server

MySQL Version

This guide is based on MySQL Installer 5.7.11.

Start the installer, once it’s done configuring you’ll be shown the license screen where you can read the license. Once done you’ll need to accept the terms before you’re able to click the Next button.

From the list of available setup types select Custom, this will allow you to select which items are downloaded (web client only) and installed. In the current version, it will automatically install MySQL to your Windows drive.

Once down click the Next button to be taken to the next screen.

Shoko Server - Select Database
MySQL Install - Select Custom

You're presented with four different products groups from which you can select various items to be installed.

The first group, MySQL Server is the actual MySQL server itself so expand each section until you can select the the MySQL Server type that corresponds to your computer.

If you're running 32-bit than select the X86 option and if you're running 64-bit select the X64 option, once selected click the Green Arrow to transfer it into the Products/Features To Be Installed section.

Once down click the Next button to be taken to the next screen.

Shoko Server - Select Database
MySQL Install - MySQL Servers

The second group, Applications will allow you to install useful and needed tools to run and maintain MySQL.

From this list select and expand MySQL Workbench 6.3 and select the version that corresponds to your computer. Do the same thing for MySQL Utilities 1.5 and select the version that corresponds to your computer.

Once down click the Next button to be taken to the next screen.

Shoko Server - Select Database
MySQL Install - Applications

The third group, MySQL Connections will allow you to install the different connection types MySQL can use.

From this list select and expand Connector/C++ and select the version that corresponds to your computer. For Connector/J and Connector/NET only one option is available, the X86 option so select that even if you've previously selected the X64 option.

Once down click the Next button to be taken to the next screen.

Shoko Server - Select Database
MySQL Install - MySQL Connections

The fourth and final group is Documentation and will allow you to install MySQL Documentation and Samples and Examples.

These are optional installs but you may find them useful if you plan to look into how JMM uses it's MySQL database or if you want to learn more about MySQL.

Before clicking the Next button, make sure to review the items you selected in the Products/Features To Be Installed. If everything looks good then click the Next button to start the install.

Shoko Server - Select Database
MySQL Install - Documentation

Click Execute to begin the install process. If you selected the web client, the MySQL Installer will download the selected items.

If any of the downloaded items fail to download, click Show Details > to view why and try re-downloading them. If they continue to fail try disabling any firewall and anti-virus software running.

If they still fail to download you can either download the complete package or ask for support in the support channel on our Discord server.

Shoko Server - Select Database
MySQL Install - Downloading

After the installer is finished Downloading the selected components, it will begin Installing them. 

If any of the selected items fail to install, click Show Details > to view why and try re-installing them. If they continue to fail try disabling any firewall and anti-virus software running. If they still fail to install ask for support in the support channel on our Discord server.

One down, every selected item should have it’s Status shown as Complete. If everything looks correct than click Next to continue, if not you need to fix any errors before moving on.

Shoko Server - Select Database
MySQL Install - Installing Selection

Configuring MySQL Community Server

Now that you've successfully installed MySQL Community Server, it's time to configure it for use.

You'll be shown an overview of the products that need to be configured before MySQL can be used. Click Next to continue on.

Shoko Server - Select Database
MySQL Install - Product Config

In the Types And Networking section select Development Machine for Config Type and make sure TCIP/IP is checked with the Port Number set to 3306, make sure Open Firewall port for network access is selected.

Finally make sure to check Show Advanced Options before clicking Next.

Shoko Server - Select Database
MySQL Install - Type and Networking

In the Accounts and Roles section you’ll need to set the password for the root account. Regardless if you plan to use the root account for Shoko you still need to set the MySQL Root Password, you can make it as easy or hard as you want as the root account is setup by default for local access only.

If you want to add an account just for Shoko, click Add User otherwise click Next to continue.

Shoko Server - Select Database
MySQL Install - Accounts & Roles

If creating a separate account for Shoko, input the Username and Password you want to use for the account.

Shoko needs to be able to access, create and modify the database so make sure DB Admin is selected for the Role. For Host you have two options, OR localhost. The first option will will make it so the account can connect to your MySQL databases locally, using a computer on the same network or over the internet. If you select this option make sure you use a strong password. Selecting localhost will make it so the account can only connect to your MySQL databases if it’s used on the same computer MySQL is installed on.

Click OK to add the account.

Shoko Server - Select Database
MySQL Install - Add New Account

The Windows Service section allows you to enable MySQL to start with windows. If you don’t want MySQL to start with Windows you can skip this step, however you will have to manually start MySQL every time you want to access your collection.

Make sure both Configure MySQL Server as a Window Service and Start the MySQL Server at System Startup are checked. You can input any name you like or leave it as the default, it does not matter.

One done click Next to continue.

Shoko Server - Select Database
MySQL Install - Windows Service

The Advanced Options section allows you to select what types of logs you want MySQL to keep and where to keep them. This can be useful for tracing errors with your server, the only one required is Slow Query Log so make sure it’s selected.

One done click Next to continue.

Shoko Server - Select Database
MySQL Install - Advanced Options

The Apply Server Configuration is your last change to go back and make any changes, if everything is correct than click Execute to apply your server configuration.

Each item should be marked with a Green Check Mark indicating each operation was successful. If there are any errors you’ll need to fix them as MySQL will not finishing installing until you do. You can ask for support in the support channel in our Discord server.

Shoko Server - Select Database
MySQL Install - Apply Server Config

Uncheck Start MySQL Workbench after Setup as you don’t need to create a database, Shoko Server will automatically create a database to use.

Congratulations! MySQL Server has been successfully installed!

Shoko Server - Select Database
MySQL Install - Install Complete