Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of installation and configuration of compressed package in mysql 5.7.24

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "mysql 5.7.24 compressed package installation configuration example analysis", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "mysql 5.7.24 compressed package installation configuration example analysis" this article bar.

I. MySQL installation package download:

Download MySQL version as needed

Click Download and select No thanks, just start my download to download the package directly.

II. Configure environmental variables

Create a MYSQL_HOME variable with the name of your decompression path.

Edit the path variable and add;%MYSQL_HOME%\bin;

Third, extract the installation package to the specified path-----my.ini file

1. After downloading, extract to the directory you want to put (version around 5.7.20 (at least 5.7.20 is), there is no my-default.ini file)

2. In the sibling directory of bin, create a new my-default.ini file. My ini file looks like this:

#Set 3306 port = 3306#Set mysql installation directory basedir=D:\tools\mysql-5.7.24-winx64#Set mysql database data storage directory datadir=D:\tools\mysql-5.7.24-winx64\data #Max connections allowed max_connections=200#Character set used by server defaults to 8-bit encoded latin1 character-set-server= utf8#Default storage engine to use when creating new tables default-storage-engine=INNODBsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES[mysql]#Set mysql client default character set default-character-set=utf8

3. Under bin directory, create (or copy my-default.ini) my.ini file, otherwise initialize mysqld --initialize-insecure, data file and report that folder cannot be found (data folder cannot be automatically generated)

My.ini:

# For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.7/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] # 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 = D:\tools\mysql-5.7.24-winx64datadir = D:\tools\mysql-5.7.24-winx64\dataport = 3306# server_id = ..... # 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

Note that the basedir and datadir paths are changed to their own mysql decompression paths

4. Install MySQL Service and Initialize

1. Run cmd as administrator and execute the command to install mysql service: mysqld --install

mysqld --install

We can see that the service has been successfully installed.

Assuming that the installation is unsuccessful, then it is possible that you installed it before but the uninstall is not completely caused, so be sure to uninstall completely.

2. Initialize MySQL:

mysqld --initialize

3. Then start MySQL:

net start mysql

4. MySQL login: mysql -u root -p

mysql -uroot -p

Note: The initial password can be in a file with the suffix.err under the generated data folder

5. Then set your own login password:

use mysql;UPDATE user SET authentication_string = PASSWORD('123456') WHERE user = 'root';

Note: When modifying the password, note that the password field has been cancelled in 5.7. Be sure to write authentication_string.

mysql>UPDATE user SET authentication_string = PASSWORD ('new password') WHERE user ='root ';mysql>FLUSH PRIVILEGES; //Refresh permissions

V. Problems and solutions during installation

Problem: Mysql installation error: unable to locate program input point fesetround on dynamic link library MSVCR120.dll

Workaround: Download Microsoft Visual C++ 2013 Redistributable Package installation

Update for Visual C++ 2013 and Visual C++ Redistributable Package

Download after a step to install, and then re-connect the database is good

The above is "mysql 5.7.24 compressed package installation configuration example analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report