Abstract: MySQL is a commonly used database in daily development. Of course, using the green version of this database requires us to manually configure the database. Of course, users can also choose to deploy the installed version of MySQL, but there is a risk that when the system is reinstalled , the MySQL data of the installed version needs to be backed up, while the green version does not need to consider this risk.
Required data files:
1. mysql-5.7.22-winx64.rar
2. Navicat+ crack.rar
Start configuration
1. Unzip the installation-free compressed package mysql-5.7.22-winx64. (Assume that the extracted directory location is D:\MySQL\)
2. Backup a copy of my-default.ini in the decompressed directory and rename it to my.ini.
3. Open the my.ini file and add the following content
# power by Gaby 2018
[client]
port=3306
[mysql]
default-character-set=utf8
[mysqld]
#设置3306端口
port=3306
# 设置mysql的安装目录
basedir="D:/MySQL/"
# 设置mysql数据库的数据的存放目录
datadir="D:/MySQL/data/"
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建表默认存储引擎
default-storage-engine=MyISAM
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# 允许最大连接数
max_connections=512
query_cache_size=0
table_cache=256
tmp_table_size=18M
thread_cache_size=8
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=35M
key_buffer_size=25M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=2M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=47M
innodb_log_file_size=24M
innodb_thread_concurrency=8
4. Add environment variables
1) The system variable MYSQL_HOME (mysql path: such as D:\MySQL)
2) Add the Path value (you can not configure it, it is only configured to run the mysql command directly in the Path) %MYSQL_HOME%/bin; (or directly D:\MySQL \bin)
5. Register MySQL as a wins service.
1) Open the cmd console with administrator privileges and enter the bin directory under the mysql decompression directory.
2) Execute the service installation command:
mysqld install MySQL –defaults-file=”mysql decompression directory\my.ini”
There will be a prompt after the installation is successful
6. Start the mysql service
1) Start from the wins service console
2) net start MySQL
7. Modify the root account password
mysql -uroot
show databases;
use mysql;
update user set password=PASSWORD(“123456”) where user=”root”;
flush privileges;
quit;
1
2
3
4
5
6
I have tried the above steps many times, if the normal configuration is absolutely There will be no problem If
there is a configuration error, the solution to reconfiguration:
1. Open CMD with administrator privileges, enter SC DELETE MySQL, and then follow the above steps again.
If the root account cannot be logged
in, 1. Edit the mysql configuration file my. ini (do not know where, please search), add
skip-grant-tables under the [mysqld] entry
2. Use the net command to restart the service
3. Enter mysql, modify the root user password, and
run cmd.exe with administrator privileges.
Switch to mysql. The bin directory
D:\MySQL\mysql-5.6.13-winx64\bin>mysqld install MySQL --defaults-file=”D:\MySQL\mysql-5.6.13-winx64\my.ini”
Test Navicat connection to MySQL After
installing Navicat, you can test his connection,
sample test diagram