[Database Learning] - [Summary] MySQL database download and installation (Msi file installation and installation-free version), Navicat download and installation

Table of contents

1. Download and install MySQL database

1) MySQL database download

MySQL official website

MySQL database download

 2) MySQL is installed through msi file

3) Use of MySQL installation-free version

1) Move the installation-free package to the installation folder location;

2) Create a new data folder

3) Create a new my.ini file and put the following contents in it

4) Configure environment variables - bin file path

5) Install and run in the following order:

6) Installation successful

3. Install Navicat visualization software

1) Navicat official website

2) Navicat installation

The blog of the sentimental mechanical man_CSDN blog - python learning, pyqt5, image processing blogger The sentimental mechanical man is good at python learning, pyqt5, image processing, and other aspects of knowledge. The sentimental mechanical man focuses on machine learning, computers Vision, image processing, deep learning, pytorch, neural network, opencv field. https://blog.csdn.net/qq_45769063 4. Problems encountered

1)Install/Remove of the Service Denied!

 2) mysql' is not recognized as an internal or external command, operable program or batch file

3) Solution to ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061) 

4)1045-Access denied for user 'root'@'localhost'

Solution:

 Possible solutions:


1. Download and install MySQL database

1) MySQL database download

MySQL official website

MySQL :: Developer Zoneicon-default.png?t=M4ADhttps://dev.mysql.com/

MySQL database download

Detailed explanation of MySQL download steps . Users can download the corresponding server installation package for free from the MySQL official download page according to their operating system type. This book takes MySQL 5.7.20 as an example to introduce its installation and configuration process under the Windows 10 operating system. Users download Windows graphical http://c.biancheng.net/view/2391.html

 2) MySQL is installed through msi file

MySQL installation tutorial, including all platforms (illustrations) icon-default.png?t=M4ADhttp://c.biancheng.net/view/2376.html

3) Use of MySQL installation-free version

Installation-free is actually to directly give you the package that has been decompressed after installation, but you still need to configure it.

The following operations are mainly required:

1) Move the installation-free package to the installation folder location;

2) Create a new data folder

 

3) Create a new my.ini file and put the following contents in it

# 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]
#skip-grant-tables 
# 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 = .....
# datadir = .....
# port = .....
# server_id = .....
basedir ="D:\Mysql\mysql-8.0.12-winx64"   # 设置mysql的安装目录 
datadir ="D:\Mysql\mysql-8.0.12-winx64\data"   # 设置mysql数据库的数据的存放目录,必须是data,或者是//xxx/data  
 
 
# 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 
 
#服务端的编码方式
character-set-server=utf8mb4
[client]
#客户端编码方式,最好和服务端保存一致
loose-default-character-set=utf8mb4
 
[WinMySQLadmin]  
Server = "D:\Mysql\mysql-8.0.12-winx64\bin\mysqld.exe"

Note: Several paths here need to be changed to your own.

 There are three places that need to be modified to your mysql installation directory:

basedir = "D://Mysql\mysql-8.0.12-winx64" #Set your own mysql installation directory 

datadir = "D://Mysql\mysql-8.0.12-winx64\data" # Set the storage directory of the data folder of your own mysql database, which must be data

Server = "D:\Mysql\mysql-8.0.12-winx64\bin\mysqld.exe" # Set the storage directory for the mysqld.exe file of your own mysql database
 

4) Configure environment variables - bin file path

 

5) Install and run in the following order:

# 初始化,下载配置文件到刚刚创建的data文件夹中
mysqld --initialize-insecure --user=mysql;

# Mysql服务添加,当看到Service successfully installed时,表示成功
mysqld -install;

# 启动Mysql服务,出现mysql 启动服务成功字样说明成功了
net start mysql;

6) Installation successful

[Essential] Detailed tutorial of MySQL installation-free version_A blog that doesn’t want to be a handsome guy-CSDN blog_How to use the installation-free version of mysql is reproduced from here but the errors have been corrected. Step 1: Download Mysql official website download address: https:/ /dev.mysql.com/downloads/mysql/ 1. Slide down the mouse and find Windows (x86, 64-bit), ZIP Archive in Other Download. Click the Download button on the right to download Mysql. If you need other versions, click here: 2. You are asked to register here. You don’t need to register. Click https://blog.csdn.net/dz77dz/article/details/117705850

3. Install Navicat visualization software

1) Navicat official website

Navicat | Products View the complete list of Navicat products, including the best database management tools Navicat, Navicat Monitor, Navicat Charts Creator, Navicat Collaboration and Navicat Data Modeler. https://www.navicat.com.cn/products

Navicat premium supports all database visualizations. Of course, you can also download Navicat for the corresponding database.

 

2) Navicat installation

The blog of the sentimental mechanical man_CSDN blog - python learning, pyqt5, image processing blogger The sentimental mechanical man is good at python learning, pyqt5, image processing, and other aspects of knowledge. The sentimental mechanical man focuses on machine learning, computers Vision, image processing, deep learning, pytorch, neural network, opencv fields. https://blog.csdn.net/qq_45769063  4. Problems encountered

1)Install/Remove of the Service Denied!

This problem was encountered when running the mysqld -install command. The reason is that because I opened the cmd command line directly from the folder, we need to open the cmd command line as an administrator.

https://jingyan.baidu.com/article/0eb457e54f1b0c43f1a9059e.htmlicon-default.png?t=M4ADhttps://jingyan.baidu.com/article/0eb457e54f1b0c43f1a9059e.html

 2) mysql' is not recognized as an internal or external command, operable program or batch file

This problem was encountered when running the mysql -uroot -p command on the command line. The reason was that the environment was not configured properly.

'mysql' is not an internal or external command, nor is it an operable program or batch file. Super detailed solution steps_semaphore-nini's blog-CSDN blog_mysql' is not an internal or external command, nor is it an operable program or batch file. Processing file [Problem] 'mysql' is not recognized as an internal or external command, operable program or batch file. [Solution] Possible reason: The environment variables are not configured. Specific steps: 1. Right-click My Computer → Properties key to enter the following figure: 2. In user variables, select Path, New, and add the MySQL path: C:\Program Files\ MySQL\MySQL Server 8.0\bin (this is mine), click OK. Click OK to complete the configuration. Then, no error is reported... https://blog.csdn.net/qq_42052591/article/details/122381215

3) Solution to ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061) 

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061) Solution_Brother Xiaoqiang. Blog - CSDN Blog_error2003 (hy000) I want to start mysql, but when I directly enter mysql -u root -p in cmd, the following problem occurs: C:\Users\lic>mysql -u root -pEnter password: ** ***ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061) Solution: Run cmd as administrator (win+Q, search for cmd and right click), enter net start mysql , the startup is successful, and then you can return to the cm running by a non-administrator https://blog.csdn.net/lic1697067085/article/details/120234123

4)1045-Access denied for user 'root'@'localhost'

This problem occurred when connecting to the database after running Navicat. The reason is that my Navicat was installed before, and the database connection was based on the previous mysql information, so an error was reported.

Solution:

Right-click to edit the connection and modify the password, account and other information.

 Possible solutions:

This is an online method. It won't work in my case, but it should be possible if the newly created database connection cannot be connected.

1045-Access denied for user 'root'@'localhost' solution, personal test available - Zhihu 1045-Access denied for user 'root'@'localhost' solution easily solved with a few lines of code 1. Enter the database: mysql -u root -p 2. Enter the database password: ******* 3. Execute the following sql in sequence: CREATE USER 'root'@'… https://zhuanlan.zhihu.com/p/435662677 

 

Guess you like

Origin blog.csdn.net/qq_45769063/article/details/125019030