win7安裝mysql-8.0.13-winx64


這里展示一下,由於需要安裝一個版本測試一下數據,其實就是超簡單的啦。

下包

注:https://dev.mysql.com/downloads/mysql/

解壓與配置

[mysqld]
basedir=C:\\Users\\hp\\Downloads\\mysql-8.0.13-winx64
datadir=C:\\Users\\hp\\Downloads\\mysql-8.0.13-winx64\\data
port=3306

 初始化、安裝、與啟動

 

C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>mysqld.exe --initialize

C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>mysqld.exe -install
Service successfully installed.

C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>net start mysql
MySQL 服務正在啟動 ...
MySQL 服務已經啟動成功。 

修改初始密碼

注:在data目錄下.err后綴名的就是日志, 日志里面記錄了初始化的信息

登錄與修改密碼

C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>mysql -u root -p3Xp_sz/(u:gl
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.13

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> ALTER USER 'root'@'localhost' IDENTIFIED BY 'lizhenghua';
Query OK, 0 rows affected (0.15 sec)

mysql> exit
Bye

C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>
C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>mysql -u root -plizhenghua
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.13 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> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.06 sec)

mysql> exit
Bye

重啟服務

C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>net stop mysql
MySQL 服務正在停止.
MySQL 服務已成功停止。


C:\Users\hp\Downloads\mysql-8.0.13-winx64\bin>net start mysql
MySQL 服務正在啟動 ..
MySQL 服務已經啟動成功。

查看進程與端口 

C:\Users\hp>netstat -ano | findStr 3306
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING       14144
  TCP    0.0.0.0:33060          0.0.0.0:0              LISTENING       14144
  TCP    [::]:3306              [::]:0                 LISTENING       14144
  TCP    [::]:33060             [::]:0                 LISTENING       14144

C:\Users\hp>wmic process get name | findStr mysql
mysqld.exe
mysqld.exe

C:\Users\hp>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM