Installing & Configuring the MySQL 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:/Apache64and
H:/php7-64and
H:/WEBfolders was previously created on the
GENERIC DISK.
At the root of the
GENERIC DISK, create the folder:
H:/MySQL8
H:/MySQL8 Open this folder:
H:/MySQL8
Unzip the file:
H:/WEB/temp/mysql-8.0.XX-win64.zipto the folder:
H:/MySQL8Unzip produces only 1 folder.
Rename the folder:
H:/MySQL8/mysql-8.0.XX-win64to
H:/MySQL8/mysql
H:/MySQL8 Create the following subfolders:
H:/MySQL8/484848H:/MySQL8/dumpH:/MySQL8/itmpH:/MySQL8/keyH:/MySQL8/logsand
H:/MySQL8/sec
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 Serveris installed and configured.
We call this subfolder as:
MySQL Folder
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 Serverthis file must be placed in this folder to complete the configuration.
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.batTo configure the
MySQL Community ServerYou must run the newly created file on the
Desktopmy.bat
MySQL Community Server TerminalA version of the
MySQL Community Server Terminalwill 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 Terminalshould close automatically.
Be patient - please.
Desktop -> my.batThis file on the
Desktophas served its purpose and can be deleted.
What did the Desktop -> my.bat?This configuration produced a new folder in
H:/MySQL8this folder was named:
H:/MySQL8/mydataintended to store the Databases generated by
MySQL Community Server
H:/MySQL8/The folder:
H:/MySQL8/mydata- Is where the Databases will be stored.
H:/MySQL8/The folder:
H:/MySQL8/logs- Is where the logs generated by
MySQL Community Server are stored.
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.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .