首页 / MYSQL / mysql5.7压缩包配置
mysql5.7压缩包配置
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mysql5.7压缩包配置,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3012字,纯文字阅读大概需要5分钟。
内容图文
\mysql-5.7.15-winx64
2、配置环境变量
新建MYSQL_HOME: K:\Mysql5.7\mysql-5.7.15-winx64 path 添加 : %MYSQL_HOME%\bin
3、新建并修改配置文件my.ini
[mysql] # 设置mysql客户端默认字符集 default-character-set=utf8 [mysqld] #设置3306端口 port = 3306 # 设置mysql的安装目录 basedir=K:\Mysql5.7\mysql-5.7.15-winx64
# 设置mysql数据库的数据的存放目录
datadir=K:\Mysql5.7\mysql-5.7.15-winx64\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
4、初始化数据库
以管理员的方式打开命令行:
PS C:\Windows\system32> mysqld --initialize --user=mysql --console 2020-06-30T01:31:27.290738Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2020-06-30T01:31:28.141309Z 0 [Warning] InnoDB: New log files created, LSN=45790 2020-06-30T01:31:28.227364Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2020-06-30T01:31:28.306351Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 6b55a09e-ba71-11ea-b270-b025aa16da03. 2020-06-30T01:31:28.313346Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid_executed‘ cannot be opened. 2020-06-30T01:31:28.323372Z 1 [Note] A temporary password is generated for root@localhost: +NtbdOBdG8fV 【记住分配的密码 我的是上图红色字体标注的那一串(+NtbdOBdG8fV)】
5、安装服务
去到mysql解压目录:
PS D:\> K: PS K:\> cd .\Mysql5.7\mysql-5.7.15-winx64\binPS K:\Mysql5.7\mysql-5.7.15-winx64\bin>
安装服务
PS K:\Mysql5.7\mysql-5.7.15-winx64\bin> mysqld --install Service successfully installed.
6、修改密码
启动服务
net start mysql
PS K:\Mysql5.7\mysql-5.7.15-winx64\bin> net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
PS K:\Mysql5.7\mysql-5.7.15-winx64\bin> mysql -u root -p+NtbdOBdG8fV
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.15
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql>
使用初始密码登陆后(上面的初始密码),执行指令 set password for root@localhost=password(‘你的需要修改的密码‘);
mysql> set password for root@localhost=password(‘mysql‘); Query OK, 0 rows affected, 1 warning (0.00 sec)
若找不到初始密码可以在my.ini中[mysqld] 添加
skip-grant-tables
mysql5.7压缩包配置
标签:this cannot been constrain statement span more tables end
本文系统来源:https://www.cnblogs.com/ywf520/p/13212086.html
内容总结
以上是互联网集市为您收集整理的mysql5.7压缩包配置全部内容,希望文章能够帮你解决mysql5.7压缩包配置所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。