Installing & Configuring the MySQL 


MySQL.png apg

In this part of this tutorial we will teach you how to install MySQL Community Server on port 3306, by default.


 H:/ 

Remember that

H:/Apache64

and

H:/php7-64

and

H:/WEB

folders was previously created on the GENERIC DISK.

At the root of the GENERIC DISK, create the folder:

H:/MySQL8

my2.png apb

 H:/MySQL8 

Open this folder:

H:/MySQL8

my3.png apb



Unzip the file:

H:/WEB/temp/mysql-8.0.XX-win64.zip

to the folder:

H:/MySQL8

my4.png apb

Unzip produces only 1 folder.



Rename the folder:

H:/MySQL8/mysql-8.0.XX-win64

to

H:/MySQL8/mysql

my5.png apb


 H:/MySQL8 

Create the following subfolders:

H:/MySQL8/484848

H:/MySQL8/dump

H:/MySQL8/itmp

H:/MySQL8/key

H:/MySQL8/logs

and

H:/MySQL8/sec

my6.png apb

Such subfolders will be intended for particular uses, according to our configuration:


H:/MySQL8/484848

- Usage not defined yet.

The current name is just a suggestion, it means it can have another name.


H:/MySQL8/dump

- Will be used, as the name suggests, to dump databases.


H:/MySQL8/itmp

- IT Management Principles.


H:/MySQL8/key

- To store security keys.


H:/MySQL8/logs

- To store logs generated by MySQL Community Server.


H:/MySQL8/mysql

- Where

MySQL Community Server

is installed and configured.

We call this subfolder as:

MySQL Folder

my7.png apb

 Configuring MySQL Community Server 


In the sequence, we display a real copy of the my.ini used in this tutorial.

Before using this my.ini, configured by us for this tutorial, first set the letter of the HD on which you are installing MySQL community Server
.

my.ini

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]
default_authentication_plugin=mysql_native_password

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir= H:\\MySQL8\\mysql
datadir= H:\\MySQL8\\mydata
port = 3306
server_id = 3
plugin_dir= H:\\MySQL8\\mysql\\lib\\plugin
log-error= H:\\MySQL8\\logs\\error
pid-file= H:\\MySQL8\\logs\\mysql.pid


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

# sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES  

 H:/MySQL8/mysql 


After changing the disk letter for its configuration.

MySQL Community Server


this file must be placed in this folder to complete the configuration.

my8.png apb


H:/MySQL8/sec

- Usage not defined yet.


MySQL Community Server


Although the MySQL Community Server is already installed and with the appropriate settings file, there are still some steps to be taken before it can be used.

These steps will be studied in sequence.



Desktop -> my.bat

Create on the

Desktop

a file:

my.bat

with the following code:

Don't forget to adapt it to take the letter of your HD

my.bat



@start H:\MySQL8\mysql\bin\mysqld.exe --initialize-insecure


Desktop -> my.bat

To configure the

MySQL Community Server

You must run the newly created file on the

Desktop

my.bat

my9.png apb


MySQL Community Server Terminal

A version of the

MySQL Community Server Terminal

will open and remain so until the configuration is complete.


Keep calm and wait for the setup to finish.


When the configuration finishes the current version of the

MySQL Community Server Terminal

should close automatically.

Be patient - please.

my10.png apb


Desktop -> my.bat

This file on the

Desktop

has served its purpose and can be deleted.

my11.png apb


What did the Desktop -> my.bat?

This configuration produced a new folder in

H:/MySQL8

this folder was named:

H:/MySQL8/mydata

intended to store the Databases generated by

MySQL Community Server

my12.png apb


H:/MySQL8/

The folder:

H:/MySQL8/mydata

- Is where the Databases will be stored.

my13.png apb


H:/MySQL8/

The folder:

H:/MySQL8/logs

- Is where the logs generated by MySQL Community Server are stored.

my14.png apb



The current

H:/MySQL8/logs/error.err

stored by the

MySQL Community Server

activity has the following format:

error.err


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2020-06-29T12:11:02.344762Z 0 [System] 
            [MY-010116] [Server] H:\MySQL8\mysql\bin\mysqld.exe (mysqld 8.0.20) 
            starting as process 10092
2020-06-29T12:11:02.449700Z 1 [System] 
            [MY-013576] [InnoDB] InnoDB initialization has started.
2020-06-29T12:11:04.075863Z 1 [System] 
            [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-06-29T12:11:04.527976Z 0 [System] 
            [MY-011323] [Server] X Plugin ready for connections. 
            Bind-address: '::' port: 33060
2020-06-29T12:11:04.852743Z 0 [Warning] 
            [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-06-29T12:11:04.937882Z 0 [System] 
            [MY-010931] [Server] H:\MySQL8\mysql\bin\mysqld.exe: 
            ready for connections. Version: '8.0.20'  socket: ''  
            port: 3306  MySQL Community Server - GPL.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

 Running the MySQL Community Server 


The MySQL Community Server is ready to run.

Running the MySQL Community Server version 8