MySQL 5.7.17 zip installation and configuration tutorial Solution to MySQL startup failure

MySQL 5.7.17 zip installation and configuration tutorial Solution to MySQL startup failure

MySQL 5.7.17, now seems to be the latest version, download address

Here you can choose your own platform version and choose your own download. Mine is the Windows version. It should be similar.

Here I will talk about the ZIP version of the downloaded file. I haven’t tried the MIS version and I don’t know.
I would like to remind you here that it is best to download the version without debug , because I downloaded it once and the installation failed in the end because there was no ini file, which caused many problems.

After decompression is complete, just put it on a created file.

The decompressed file has a default configuration file (my-default.ini). Create a new file in the decompressed path: my.ini (copy the my-default.ini file and modify it above), copy the following code into it. F:\mysql appears twice in the code. This is the decompression path of my MySQL. You can replace it according to your own path.

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8 
[mysqld]
#Set port 3306 port = 3306 
# Set the installation directory of mysql basedir="F:\mysql"
# Set the storage directory of mysql database data datadir="F:\mysql\data"
# Maximum number of connections allowed max_connections=200
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB

Run the command prompt as an administrator (right-click the icon in the lower left corner, I forgot what it is called, there is a command prompt as an administrator, you must use this, don’t just press the "what+R" button), switch to the MySQL bin directory, enter the mysqld install command (note that it is mysqld, not mysql) , and press Enter to install MySQL, as shown in the figure below: Here, because I have already downloaded and installed it, it shows that the service already exists. Yours should show that the service was created successfully.

The installation is now complete, and we have one last step to run it.

Type net start mysql to start MySQL, and type net stop mysql to shut down the MySQL service . Still the same question, mine has been completed, yours should say "starting" or "started successfully".

Configure the environment variables here. The locations of environment variables in different Windows versions are slightly different. They are roughly in System and Security-System-Advanced System Settings-Environment Variables. We find an environment variable for path here, click Edit, then click Edit Text, and add the path of your MySQL bin under its path; remember to add ";" after each path segment.

Some people may encounter some problems here, and unfortunately I also encountered it. Some people may encounter a problem of startup failure.

Solution: After installing MySQL, open the cmd command window and enter the bin directory in the MySQL installation directory, then enter the following command and press Enter: mysqld –initialize-insecure –user=mysql

After executing the above command, MySQL will create a data folder and a default database. The login username is root and the password is blank. Then you can start the MySQL service through the command net start mysql.

After that, I just did it myself. But it is under cmd. Not a graphical interface. Two better graphical interfaces are workbench and sqlyog developed by MySQL itself. There is a tutorial for installing workbench later.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Solve the problem of pycharm failing to install numpy
  • The data folder failed to be created automatically during the installation of mysql8.0.14.zip. The service cannot be started.
  • Solution to the failure of installing pycurl in Python
  • Solve the problem of Mac installation scrapy failure
  • Solve the problem of failure caused by slow network timeout when installing Electron with npm
  • How to solve the problem of failed installation of python pyqt5
  • Solution to the problem of PHPnow installation service [apache_pn] failing
  • Solution to the problem of failure to install PyInstaller

<<:  How to delete special character file names or directories in Linux

>>:  JavaScript and JQuery Framework Basics Tutorial

Recommend

Vue's guide to pitfalls using throttling functions

Preface In a common business scenario, we need to...

How to detect whether a file is damaged using Apache Tika

Apache Tika is a library for file type detection ...

About installing python3.8 image in docker

Docker Hub official website 1. Search for Python ...

Detailed explanation of MySQL user rights verification and management methods

This article uses examples to illustrate how to v...

Detailed explanation of loop usage in javascript examples

I was bored and sorted out some simple exercises ...

Mobile browser Viewport parameters (web front-end design)

Mobile browsers place web pages in a virtual "...

React internationalization react-i18next detailed explanation

Introduction react-i18next is a powerful internat...

Detailed explanation of location and rewrite usage in nginx

1. Summary of location usage Location can locate ...

Problem analysis of using idea to build springboot initializer server

Problem Description Recently, when I was building...

Why should you be careful with Nginx's add_header directive?

Preface As we all know, the nginx configuration f...

Javascript destructuring assignment details

Table of contents 1. Array deconstruction 2. Obje...