mysql 8.0.19 winx64.zip安装教程

本文记录了mysql 8.0.19 winx64.zip安装教程,供大家参考

新建 my.ini文件

[mysqld]
default_authentication_plugin=mysql_native_password
# 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.
# 设置mysql数据库的数据的存放目录
basedir=E:\app\mysql-8.0.19-winx64
datadir=E:\app\mysql-8.0.19-winx64\data
#设置3306端口
port = 3306
# server_id = .....
 
 
# 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 
# 服务端使用的字符集默认为UTF8
character-set-server = utf8mb4
 
performance_schema_max_table_instances = 600
table_definition_cache = 400
table_open_cache = 256
 
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB 
#最大连接数
max_connections=200
[mysql]
default-character-set = utf8mb4
 
[client]
default-character-set = utf8mb4

初始化密码查找:

如果data文件夹已经存在,先删除后,再执行以下:

mysqld --initialize --console

可以看到控制台输出有以下:

A temporary password is generated for root@localhost: hjd/Qg=XN4D*

在安装目录下生成 data文件 不用自己创建。

执行 mysqld -install  安装mysql数据库

(如果不用管理员身份运行,将会因为权限不够而出现错误:Install/Remove of the Service Denied!)

执行时一定要在bin目录底下(或者把bin层级的路径添加到path环境变量中)

net start mysql  启动服务(需要管理员权限)

net stop mysql 关闭服务。

启动成功以后
输入 mysql -u root -p
Enter password:  --------------上述临时密码
直接回车就行
接下来设置自己的密码
set password=“你的密码”

查看一下默认安装的数据库

show databases;

精彩专题分享:

mysql不同版本安装教程

mysql5.7各版本安装教程

mysql5.6各版本安装教程

mysql8.0各版本安装教程

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。

你可能感兴趣的:(mysql 8.0.19 winx64.zip安装教程)