当前位置:网站首页>MySQL 5.7.16 decompression installation process
MySQL 5.7.16 decompression installation process
2022-04-22 06:24:00 【bglmmz】
windows server 2012 64bit
mysql-5.7.16-winx64.zip
1. Unzip to d:/mysql/mysql5716, newly build d:/mysql/mysql5716/tmp, d:/mysql/mysql5716/log and d:/mysql/mysql5716/data Catalog , rename d:/mysql/mysql5716/my-default.ini by my.ini, And make appropriate modifications
[quote]
[mysql]
default-character-set=utf8
[mysqld]
# If you don't use double quotes , Backslash must be two ( Escape character )
basedir=D:/mysql/mysql5716
tmpdir=D:/mysql/mysql5716/tmp
datadir=D:/mysql/mysql5716/data
port=3306
server_id=1
character-set-server=utf8
default-storage-engine=INNODB
innodb_file_per_table=1
lower_case_table_names=1
innodb_buffer_pool_size = 128M
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
# General and Slow logging.
log-output=FILE
slow-query-log=1
slow_query_log_file=D:/mysql/mysql5716/log/slow-query.log
long_query_time=5
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[/quote]
2. To configure winodws Environment variables of
3. Run the command line window with the Administrator , Get into d:/mysql/mysql5716/bin
4. stay mysql/bin Next , function :
mysqld --install
Relative , The command to uninstall the service is :mysql --remove MySQL( Of course , You have to stop the service first )
5. stay mysql/bin Next , function :
mysqld --initialize --console
If it works , Then record the last prompt's default root@localhost password ;
If there is an error prompt , May be my.ini The directory configured in was not found ( such as tmpdir, You need to create it manually in advance )
6. stay mysql/bin Next , function :
net start MySQL
Successful launch .
7. stay mysql/bin Next , function :
mysql -uroot -p
Enter and connect mysql, And enter the default password recorded above
8. stay mysql> The input :
use msyql; Report the following error message , This is because of the first entry into mysql, Need modification root password
[quote]
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
[/quote]
9. stay mysql> The input :
update mysql.user set authentication_string=password('12345678') where user='root' and Host = 'localhost';
modify root The password for 12345678. Be careful : from 5.7 Start ,user Table no apssword This field , It is authentication_string Field .
[quote]
Query OK, 0 rows affected, 1 warning (0.00 sec)
[/quote]
Secondary installation 5.7.17, Running this won't work , Or to reset the password first , Then execute this sentence first :
set password for 'root'@'localhost'=password('12345678');
10. stay mysql> The input :
update mysql.user set host = '%' where user = 'root'; such ,mysql You can connect remotely with client tools .
11. Last , stay mysql> The input :
flush privileges;
12. stay mysql/bin Next , function :
net stop MySQL
stop it mysql, Run again :
net start MySQL
To complete the restart .
At the beginning , No implementation of article 5 Step , Has been unable to start mysql service , Later, I looked up the information , Find out mysql5.7.7 After the version , The decompressed version no longer comes with data Initialize data , It is necessary to carry out section 5 Step to initialize mysql
mysql-5.7.16-winx64.zip
1. Unzip to d:/mysql/mysql5716, newly build d:/mysql/mysql5716/tmp, d:/mysql/mysql5716/log and d:/mysql/mysql5716/data Catalog , rename d:/mysql/mysql5716/my-default.ini by my.ini, And make appropriate modifications
[quote]
[mysql]
default-character-set=utf8
[mysqld]
# If you don't use double quotes , Backslash must be two ( Escape character )
basedir=D:/mysql/mysql5716
tmpdir=D:/mysql/mysql5716/tmp
datadir=D:/mysql/mysql5716/data
port=3306
server_id=1
character-set-server=utf8
default-storage-engine=INNODB
innodb_file_per_table=1
lower_case_table_names=1
innodb_buffer_pool_size = 128M
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
# General and Slow logging.
log-output=FILE
slow-query-log=1
slow_query_log_file=D:/mysql/mysql5716/log/slow-query.log
long_query_time=5
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[/quote]
2. To configure winodws Environment variables of
3. Run the command line window with the Administrator , Get into d:/mysql/mysql5716/bin
4. stay mysql/bin Next , function :
mysqld --install
Relative , The command to uninstall the service is :mysql --remove MySQL( Of course , You have to stop the service first )
5. stay mysql/bin Next , function :
mysqld --initialize --console
If it works , Then record the last prompt's default root@localhost password ;
If there is an error prompt , May be my.ini The directory configured in was not found ( such as tmpdir, You need to create it manually in advance )
6. stay mysql/bin Next , function :
net start MySQL
Successful launch .
7. stay mysql/bin Next , function :
mysql -uroot -p
Enter and connect mysql, And enter the default password recorded above
8. stay mysql> The input :
use msyql; Report the following error message , This is because of the first entry into mysql, Need modification root password
[quote]
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
[/quote]
9. stay mysql> The input :
update mysql.user set authentication_string=password('12345678') where user='root' and Host = 'localhost';
modify root The password for 12345678. Be careful : from 5.7 Start ,user Table no apssword This field , It is authentication_string Field .
[quote]
Query OK, 0 rows affected, 1 warning (0.00 sec)
[/quote]
Secondary installation 5.7.17, Running this won't work , Or to reset the password first , Then execute this sentence first :
set password for 'root'@'localhost'=password('12345678');
10. stay mysql> The input :
update mysql.user set host = '%' where user = 'root'; such ,mysql You can connect remotely with client tools .
11. Last , stay mysql> The input :
flush privileges;
12. stay mysql/bin Next , function :
net stop MySQL
stop it mysql, Run again :
net start MySQL
To complete the restart .
At the beginning , No implementation of article 5 Step , Has been unable to start mysql service , Later, I looked up the information , Find out mysql5.7.7 After the version , The decompressed version no longer comes with data Initialize data , It is necessary to carry out section 5 Step to initialize mysql
版权声明
本文为[bglmmz]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220548531227.html
边栏推荐
- Distributed transaction solution Seata
- 重读Scrapy:Spider篇_CrawlSpider的使用分析
- JS debugging interference - infinite debugger bypass
- 服务端打印jersey restful请求的request/response
- phphphphphphphp
- 异步迭代器 & 异步生成器 & 异步上下文管理器
- Pytest (II)
- MySQL 5.7 resets the root password. I tried the method in N and finally found it
- Thinkphp5 how to hide index PHP entry file
- 发布你自己的轮子 - PyPI打包上传实践
猜你喜欢
随机推荐
茉莉X4矿池链接方法
LDAP authentication page management
菜鸡的数据库基础知识
茉莉X4-1U刀片算力服务器评测
Back again
mysql 基础知识2
异步迭代器 & 异步生成器 & 异步上下文管理器
[required] 123
[MySQL] multi table joint query, connection query and sub query
金贝Lb1功耗参数实测
Pandas to_sql 函数避坑指南「附可运行正确代码」
解决js计算精度问题
有点意思的质数题HDU5750
如何在代码中得知是否在JUNIT环境运行?
Mysql gap lock引起的一个问题
jasminer茉莉X4-Q和茉莉X4-1U,详细对比
利用 PHP POST 临时文件机制实现任意文件上传
2021-09-23
Source code analysis of AQS and reentrantlock
es6模块化









