SQL安装
2023-04-04 本文已影响0人
林立镇
MySQL :: Download MySQL Installer (Archived Versions)
安装地址
免安装教程.exe
初始化配置
my.ini
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:\0software\mysql-5.7.29-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\0software\mysql-5.7.29-winx64\data
# 允许最大连接数
max_connections=200
# 设置mysql服务端默认字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
D:\0software\mysql-5.7.29-winx64 根据实际安装地址修改
配置环境变量
path
D:\0software\mysql-5.7.29-winx64\bin 根据实际安装地址修改
初始化
cmd到E:\0software\mysql-8.0.31-winx64\bin
mysqld -remove
mysqld -install
D:\0software\mysql-5.7.29-winx64\bin>mysqld --initialize-insecure --user=mysql
D:\0software\mysql-5.7.29-winx64\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
MySQL初始化密码,一直回车,不用输入密码登录
D:\0software\mysql-5.7.29-winx64\bin>mysqladmin -u root -p password
Enter password:
New password:
Confirm new password:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
登录
D:\0software\mysql-5.7.29-winx64\bin>mysql -u root -p
Enter password:、
进入mysql
mysql> SHOW DATABASES