Table of contents
1. Download and install MySQL database
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;
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:
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'
1. Download and install MySQL database
1) MySQL database download
MySQL official website
MySQL :: Developer Zonehttps://dev.mysql.com/
MySQL database download
2) MySQL is installed through msi file
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
3. Install Navicat visualization software
1) Navicat official website
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.
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.
3) Solution to ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)
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.