沙滩星空的博客沙滩星空的博客

windows10安装mysql

下载Mysql

下载地址: https://dev.mysql.com/downloads/mysql/
下载文件: zip压缩包(mysql-8.0.28-winx64.zip)
无需登录,点击底部“No thanks, just start my download.” 即可开始下载

解压文件到不包含空格的目录下

配置初始化的my.ini文件

[client]
default-character-set   = utf8mb4

[mysqld]
port = 3306
basedir = D:\\App\\mysql-8.0.28-winx64
# datadir=D:\\Users\\admin\\dnmp\\data\\mysql

max_connections=2000
character-set-server    = utf8mb4
collation-server        = utf8mb4_unicode_ci

default-storage-engine=INNODB

default-time-zone       = '+8:00'

[mysql]
default-character-set   = utf8mb4

安装和启动

# 创建数据库目录并生成临时密码
mysqld --initialize --console
mysqld --install
# 开启服务
net start mysql
# 停止服务
net stop mysql
# Too many connections.
mysql> show variables like '%max_connections%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| max_connections        | 2000  |
| mysqlx_max_connections | 100   |
+------------------------+-------+
2 rows in set (0.01 sec)

# Lock wait timeout exceeded; try restarting transaction
mysql> show variables like 'innodb_lock_wait_timeout';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| innodb_lock_wait_timeout | 50    |
+--------------------------+-------+
1 row in set (0.02 sec)

https://blog.csdn.net/w10101010_y/article/details/83388965
未经允许不得转载:沙滩星空的博客 » windows10安装mysql

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址