Summary of installation steps and problems encountered in decompressing the mysql5.7.24 version

Summary of installation steps and problems encountered in decompressing the mysql5.7.24 version

1. Download

https://dev.mysql.com/downloads/mysql/

2. Unzip to a fixed location, such as D:\MySQL\mysql-5.7.24

3. Add the my.ini file

Same level as bin...
[mysql]

Set the default character set for the MySQL client

default-character-set=utf8
 [mysqld]

Set port 3306

port = 3306

Set the installation directory of MySQL

basedir=D:\MySQL\mysql-5.7.24

Set the storage directory for mysql database data

datadir=D:\MySQL\mysql-5.7.24\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 new tables

default-storage-engine=INNODB
max_connect_errors=100
 explicit_defaults_for_timestamp=true
 ···

4. Initialization

mysqld --install mysql --defaults-file=D:\MySQL\mysql-5.7.24\my.ini

5. Installation service

mysqld --install mysql

6. Startup

net start mysql

Finish

Problems encountered

1. Start and then stop the MySQL service on the local computer. Some services will automatically stop when they are not in use by other services or programs.

Or the console reports an error

mysql service cannot be started

The service did not report any errors

You can re-initialize and restart. Before initialization, you need to clear the data folder (same level as bin)

You can also delete the service and re-register

mysqld -remove mysql

2. Re-registering may reveal other errors such as: TIMESTAMP with implicit DEFAULT value is deprecated

Solution:

In the my.ini file, add a line under [mysqld] with explicit_defaults_for_timestamp=true. That's it

The meaning of this statement is #enable query cache, which is also one of the web caches. For repeated queries, you only need to read them in the cache, reducing the access to the database.

3. Log in and change the password according to the instructions on the Internet:

mysqladmin -uroot -p password 新密碼

Found that it would also report an error

mysql Access denied for user root@localhost error

Skip password login and change table user

 update user set password=password("new password") where user="root";
 The password column name may also be authentication_string

Then flush privileges;

4. How to skip password login

In the MySQL configuration file my.ini, add skip-grant-tables under [mysqld], shut down the MySQL service and restart it;

Enter the command: mysql -u root -p

After pressing Enter, you will be asked to enter your password. Press Enter to skip this and you will enter MySQL directly.

After this setting, you can directly double-click mysql.exe in D:\MySQL5.7.10\bin to start it without entering commands.

Summarize

The above is the installation steps of the mysql5.7.24 decompression version introduced by the editor and a summary of the problems encountered. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Detailed tutorial on compiling and installing MySQL 5.7.24 on CentOS7
  • Centos7.5 installs mysql5.7.24 binary package deployment
  • The perfect solution for MYSQL5.7.24 installation without data directory and my-default.ini and service failure to start
  • Detailed graphic description of the database installation process of MySQL version 5.7.24
  • MySQL 5.7.24 installation and configuration graphic tutorial
  • MySQL 5.7.24 installation and configuration method graphic tutorial
  • How to install mysql5.7.24 binary version on Centos 7 and how to solve it
  • MySQL 5.7.24 compressed package installation and configuration method graphic tutorial

<<:  Detailed explanation of the execution order of JavaScript Alert function

>>:  Detailed explanation of how to use Docker-Compose commands

Recommend

Several ways to submit HTML forms_PowerNode Java Academy

Method 1: Submit via the submit button <!DOCTY...

A simple method to be compatible with IE6's min-width and min-height

If a website is widescreen, you drag the browser ...

How to install jupyter in docker on centos and open ports

Table of contents Install jupyter Docker port map...

5 Easy Ways to Free Up Space on Ubuntu

Preface Most people will probably perform this op...

Detailed tutorial on building a local idea activation server

Preface The blogger uses the idea IDE. Because th...

How to implement Linux deepin to delete redundant kernels

The previous article wrote about how to manually ...

Mysql method to copy a column of data in one table to a column in another table

mysql copy one table column to another table Some...

Detailed explanation of two points to note in vue3: setup

Table of contents In vue2 In vue3 Notes on setup ...

How to change the domestic image source for Docker

Configure the accelerator for the Docker daemon S...

Bootstrap+Jquery to achieve calendar effect

This article shares the specific code of Bootstra...

MySQL index knowledge summary

The establishment of MySQL index is very importan...

An example of how to optimize a project after the Vue project is completed

Table of contents 1. Specify different packaging ...

Native JS encapsulation vue Tab switching effect

This article example shares the specific code of ...

Why MySQL can ignore time zone issues when using timestamp?

I have always wondered why the MySQL database tim...