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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql 5.7 window x64_window环境配置Mysql 5.7.21 windowx64.zip免安装版教程详解

發布時間:2024/9/27 数据库 75 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql 5.7 window x64_window环境配置Mysql 5.7.21 windowx64.zip免安装版教程详解 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.從官網下載mysql-5.7.21-windowx64.zip mysql下載頁面

2.解壓到合適的位置(E:mysql) 這名字是我改過的

3.配置環境變量,將E:mysqlbin 添加到PATH中

4.在mysql目錄下(E:mysql) 創建 my.ini文件,內容如下:

[mysql]

# 設置mysql客戶端默認字符集

default-character-set=utf8

[mysqld]

#設置3306端口

port = 3306

# 設置mysql的安裝目錄

basedir=E:mysql

# 設置mysql數據庫的數據的存放目錄

datadir=E:mysqldata

# 允許最大連接數

max_connections=200

# 服務端使用的字符集默認為8比特編碼的latin1字符集

character-set-server=utf8

# 創建新表時將使用的默認存儲引擎

default-storage-engine=INNODB

"#"為注釋

5.管理員身份運行cmd

切換目錄 cd E:mysqlbin

生成mysql服務(就是安裝my.ini文件)

E:mysqlbin> mysqld -install;

Service successfully installed.

生成data目錄? E:mysqlbin> mysqld --initialize-insecure --user=mysql ;

這里生成失敗的話看下面

E:mysqlbin>cd ../

E:mysql> mysqld --initialize-insecure --user=mysql ;

啟動mysql服務

E:mysqlbin> net start mysql;

MySQL 服務正在啟動 .

MySQL 服務已經啟動成功。

6.登錄數據庫,修改密碼(默認為空)

E:mysqlbin> mysql -u root -p;

Enter password: //這里直接回車

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

Your MySQL connection id is 2

Server version: 5.7.21 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, 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>

修改密碼

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| sys |

+--------------------+

4 rows in set (0.00 sec)

mysql> use mysql;

Database changed

mysql> set password for 'root'@'localhost'=password('新密碼');

mysql> flush privileges;

退出測試是否成功

mysql> quit;

E:mysqlbin> mysql -u root -p;

Enter password:

注釋:

在mysql中一條語句結束加;號

開始mysql服務net start mysql;

停止mysql服務net stop mysql;

生成服務mysqld -install;

刪除服務mysqld -remove;

登錄數據庫mysql -u root -p;

退出mysql> quit;

總結

總結

以上是生活随笔為你收集整理的mysql 5.7 window x64_window环境配置Mysql 5.7.21 windowx64.zip免安装版教程详解的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。