北京p2p网站建设,绿色资源网下载,遵义网站建设制作,排名优化网站Win10系统下MySQL 8.0.20安装和配置超详细教程MySQL下载MySQL直接去官网下载就行#xff0c;选择community版本(免费)下载#xff0c;链接。在select operating system中选择Microsoft Windows#xff0c;下方对应出现最新版本的MySQL#xff0c;目前是MySQL 8.0.20#x…Win10系统下MySQL 8.0.20安装和配置超详细教程MySQL下载MySQL直接去官网下载就行选择community版本(免费)下载链接。在select operating system中选择Microsoft Windows下方对应出现最新版本的MySQL目前是MySQL 8.0.20有两个zip文件选择第一个Windows (x86, 64-bit), ZIP Archive点击右侧的Download按钮进行下载官网下载有时速度比较慢直接点击链接也可以下载mysql 8.0.20安装与配置将下载好的压缩包解压缩到全英文目录下比如我在D盘新建了MySQL文件夹解压到该文件夹下D:/MySQL然后把mysql 8.0.20所在的路径D:\MySQL\mysql-8.0.20-winx64添加到环境变量Path中接下来正式安装和配置MySQL(一)首先在D:\MySQL\mysql-8.0.20-winx64路径下创建一个my.ini文件直接新建文本文档然后重命名为my.ini即可。在文档中添加以下内容(注意修改basedir和datadir的路径)[mysqld]# 设置3306端口port3306# 设置mysql的安装目录basedirD:\\MySQL\\mysql-8.0.20-winx64 # 此处为mysql的解压缩路径# 设置mysql数据库的数据的存放目录datadirD:\\MySQL\\mysql-8.0.20-winx64\\Data # 此处同上先不要在路径中创建Data目录后面初始化时会自动生成# 允许最大连接数max_connections200# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统max_connect_errors10# 服务端使用的字符集默认为UTF8character-set-serverutf8# 创建新表时将使用的默认存储引擎default-storage-engineINNODB# 默认使用“mysql_native_password”插件认证default_authentication_pluginmysql_native_password[mysql]# 设置mysql客户端默认字符集default-character-setutf8[client]# 设置mysql客户端连接服务端时默认使用的端口port3306default-character-setutf8(二)以管理员权限打开cmd(注意要以管理员权限打开)并将路径切换到D:\MySQL\mysql-8.0.20-winx64\binMicrosoft Windows [Version 10.0.18363.815](c) 2019 Microsoft Corporation。保留所有权利。C:\Windows\system32D:D:\cd MySQLD:\MySQLcd mysql-8.0.20-winx64D:\MySQL\mysql-8.0.20-winx64cd binD:\MySQL\mysql-8.0.20-winx64\bin输入mysqld --initialize --console进行初始化。该步可以得到mysql的初始密码rootlocalhost后面那一串就是初始密码先记录下来待会要用到D:\MySQL\mysql-8.0.20-winx64\binmysqld --initialize --console2020-05-10T11:26:21.895908Z 0 [System] [MY-013169] [Server] D:\MySQL\mysql-8.0.20-winx64\bin\mysqld.exe (mysqld 8.0.20) initializing of server in progress as process 97642020-05-10T11:26:21.897278Z 0 [Warning] [MY-013242] [Server] --character-set-server: utf8 is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release.Please consider using UTF8MB4 in order to be unambiguous.2020-05-10T11:26:21.915225Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.2020-05-10T11:26:22.619057Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.2020-05-10T11:26:24.265774Z 6 [Note] [MY-010454] [Server] A temporary password is generated for rootlocalhost: 9Zh31zk-mof输入mysqld --install(如果需要安装多个mysql服务这步输入mysqld --install [服务名])D:\MySQL\mysql-8.0.20-winx64\binmysqld --installService successfully installed.显示Service successfully installed则说明安装成功输入net start mysql启动MySQL服务D:\MySQL\mysql-8.0.20-winx64\binnet start mysqlThe MySQL service is starting.The MySQL service was started successfully.输入mysql -u root -p使用初始密码登录mysql在Enter password后输入初始密码D:\MySQL\mysql-8.0.20-winx64\binmysql -u root -pEnter password: ************Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.20Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type help; or \h for help. Type \c to clear the current input statement.登录后把初始密码修改掉可以设置成自己容易记住的密码。输入ALTER USER rootlocalhost IDENTIFIED WITH mysql_native_password BY 自己定义的密码;(分号一定要带)mysql ALTER USER rootlocalhost IDENTIFIED WITH mysql_native_password BY 自己定义的密码;Query OK, 0 rows affected (0.02 sec)到这一步就完成了输入show database;可以查看包含哪些数据表mysql show databases;--------------------| Database |--------------------| information_schema || mysql || performance_schema || sys |--------------------4 rows in set (0.01 sec)精彩专题分享以上就是本文的全部内容希望对大家的学习有所帮助也希望大家多多支持脚本之家。