日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > 数据库 >内容正文

数据库

win7安装mysql 5.7.25_Windows下安装mysql-5.7.25-winx64.zip

發(fā)布時(shí)間:2024/9/18 数据库 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 win7安装mysql 5.7.25_Windows下安装mysql-5.7.25-winx64.zip 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

官網(wǎng)下載并解壓mysql-5.7.25-winx64.zip,然后配置環(huán)境變量

在解壓的目錄下創(chuàng)建data文件夾用于存放數(shù)據(jù),再創(chuàng)建my.ini配置文件,內(nèi)容如下:

[mysqld]

#設(shè)置3306端口

port = 3306

# 設(shè)置mysql的安裝目錄

basedir=F:\\software-school\\mysql-5.7.25

# 設(shè)置mysql數(shù)據(jù)庫(kù)的數(shù)據(jù)的存放目錄

datadir=F:\\software-school\\mysql-5.7.25\\data

# 允許最大連接數(shù)

max_connections=200

# 服務(wù)端使用的字符集默認(rèn)為8比特編碼的latin1字符集

character-set-server=utf8

# 創(chuàng)建新表時(shí)將使用的默認(rèn)存儲(chǔ)引擎

default-storage-engine=INNODB

注意: 這里文件目錄要使用雙斜杠

以管理員權(quán)限打開cmd窗口,輸入以下命令

1、mysqld --initialize --user=mysql --console 初始化數(shù)據(jù)庫(kù),在data目錄里生成數(shù)據(jù)文件,會(huì)生成一個(gè)默認(rèn)密碼,復(fù)制好密碼, 以便待會(huì)兒修改密碼:

C:\WINDOWS\system32>mysqld --initialize --user=mysql --console

2019-02-20T08:15:24.348929Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2019-02-20T08:15:24.728509Z 0 [Warning] InnoDB: New log files created, LSN=45790

2019-02-20T08:15:24.815555Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2019-02-20T08:15:24.914895Z 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: ac968873-34e7-11e9-b7be-54e1ade440b0.

2019-02-20T08:15:24.949780Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2019-02-20T08:15:24.958325Z 1 [Note] A temporary password is generated for root@localhost: yDaJeiam:8

2、mysqld -install 安裝MySQL服務(wù)

C:\WINDOWS\system32>mysqld -install

Service successfully installed.

3、net start mysql 啟動(dòng)MySQL服務(wù)

C:\WINDOWS\system32>net start mysql

MySQL 服務(wù)正在啟動(dòng) .

MySQL 服務(wù)已經(jīng)啟動(dòng)成功。

4、mysql -u root -p 輸入剛才的復(fù)制的默認(rèn)密碼,登陸mysql

C:\WINDOWS\system32>mysql -uroot -p

Enter password: ************

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.7.25

Copyright (c) 2000, 2019, 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('garcon');

Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql>

5、SET PASSWORD FOR 'root'@'localhost' = PASSWORD('garcon'); 修改密碼

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('garcon');

Query OK, 0 rows affected, 1 warning (0.00 sec)

到此安裝完成

總結(jié)

以上是生活随笔為你收集整理的win7安装mysql 5.7.25_Windows下安装mysql-5.7.25-winx64.zip的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。