mysql?8.0.29?winx64.zip安裝配置方法圖文教程
win11安裝mysql8最新壓縮包版,供大家參考,具體內容如下
1、下載mysql
2、解壓
3、初始化數據庫并安裝啟動服務
以管理員身份打開CMD命令控制臺
cd c:/dbs/mysql-8.0.29/bin 進入mysql8.0.29目錄
mysqld --initialize-insecure 初始化,會自動的在c:/dbs/mysql-8.0.29/data 建立目錄
mysqld install 安裝服務,服務名稱為mysql
net start mysql 開啟數據庫服務
net stop mysql 關閉數據庫服務
mysqld remove 卸載服務
如果要通過窗口查看服務,在運行中可以輸入services.msc 打開服務窗口
4、登錄服務器測試
C:\Users\webrx>cd \ C:\>cd dbs\mysql-8.0.29 C:\dbs\mysql-8.0.29>cd bin #登錄本機 -hlocalhost -uroot -p空沒有密碼 -P3306 可以不寫 C:\dbs\mysql-8.0.29\bin>mysql -uroot Welcome to the MySQL monitor. ?Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.29 MySQL Community Server - GPL Copyright (c) 2000, 2022, Oracle and/or its affiliates. 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> select @@hostname,@@port,@@version,@@basedir,@@datadir,now(); +------------+--------+-----------+----------------------+---------------------------+---------------------+ | @@hostname | @@port | @@version | @@basedir ? ? ? ? ? ?| @@datadir ? ? ? ? ? ? ? ? | now() ? ? ? ? ? ? ? | +------------+--------+-----------+----------------------+---------------------------+---------------------+ | wp ? ? ? ? | ? 3306 | 8.0.29 ? ?| C:\dbs\mysql-8.0.29\ | C:\dbs\mysql-8.0.29\data\ | 2022-05-11 14:25:17 | +------------+--------+-----------+----------------------+---------------------------+---------------------+ 1 row in set (0.00 sec) mysql> show databases; +--------------------+ | Database ? ? ? ? ? | +--------------------+ | information_schema | | mysql ? ? ? ? ? ? ?| | performance_schema | | sys ? ? ? ? ? ? ? ?| +--------------------+ 4 rows in set (0.02 sec) mysql> select host,user,plugin from mysql.user; +-----------+------------------+-----------------------+ | host ? ? ?| user ? ? ? ? ? ? | plugin ? ? ? ? ? ? ? ?| +-----------+------------------+-----------------------+ | localhost | mysql.infoschema | caching_sha2_password | | localhost | mysql.session ? ?| caching_sha2_password | | localhost | mysql.sys ? ? ? ?| caching_sha2_password | | localhost | root ? ? ? ? ? ? | caching_sha2_password | +-----------+------------------+-----------------------+ 4 rows in set (0.00 sec) mysql> create user admin identified with mysql_native_password by 'admin'; Query OK, 0 rows affected (0.01 sec) mysql> grant all on *.* to admin; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> select host,user,plugin from mysql.user; +-----------+------------------+-----------------------+ | host ? ? ?| user ? ? ? ? ? ? | plugin ? ? ? ? ? ? ? ?| +-----------+------------------+-----------------------+ | % ? ? ? ? | admin ? ? ? ? ? ?| mysql_native_password | | localhost | mysql.infoschema | caching_sha2_password | | localhost | mysql.session ? ?| caching_sha2_password | | localhost | mysql.sys ? ? ? ?| caching_sha2_password | | localhost | root ? ? ? ? ? ? | caching_sha2_password | +-----------+------------------+-----------------------+ 5 rows in set (0.00 sec)
5、使用sqlyog 連接mysql8.0.29
注意:低版本的sqlyog(13.1.1及以下)無法識別mysql新版本(5.7-8)的加密機制(caching_sha2_password)
必須使用admin用戶(在步驟4中建立的使用舊加密機制(mysql_native_password)的用戶)登錄
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關文章
MySQL 使用 ORDER BY 排序和 DELETE 刪
這篇文章主要介紹了MySQL 使用 ORDER BY 排序和 DELETE 刪除記錄的操作過程,即數據庫查詢與數據操作,本文通過示例代碼給大家介紹的非常詳細,需要的朋友參考下吧2023-11-11MySQL中having關鍵字詳解以及與where的區(qū)別
在MySQL中HAVING和WHERE是用于過濾數據的兩個重要的關鍵字,它們在查詢語句中的位置和功能有所不同,這篇文章主要給大家介紹了關于MySQL中having關鍵字詳解以及與where區(qū)別的相關資料,需要的朋友可以參考下2024-07-07Windows服務器下MySql數據庫單向主從備份詳細實現(xiàn)步驟分享
將主服務器中的MySql數據庫同步到從服務器中,使得對主服務器的操作可以即時更新到從服務器,避免主服務器因環(huán)境或者網絡異常一時無法使用,達到備份效果,這篇文章整理的確實挺詳細的2012-05-05