mysql?8.0.29?winx64.zip安裝配置方法圖文教程
win11安裝mysql8最新壓縮包版,供大家參考,具體內(nèi)容如下
1、下載mysql
2、解壓
3、初始化數(shù)據(jù)庫并安裝啟動服務(wù)
以管理員身份打開CMD命令控制臺
cd c:/dbs/mysql-8.0.29/bin 進(jìn)入mysql8.0.29目錄
mysqld --initialize-insecure 初始化,會自動的在c:/dbs/mysql-8.0.29/data 建立目錄
mysqld install 安裝服務(wù),服務(wù)名稱為mysql
net start mysql 開啟數(shù)據(jù)庫服務(wù)
net stop mysql 關(guān)閉數(shù)據(jù)庫服務(wù)
mysqld remove 卸載服務(wù)
如果要通過窗口查看服務(wù),在運行中可以輸入services.msc 打開服務(wù)窗口
4、登錄服務(wù)器測試
C:\Users\webrx>cd \ C:\>cd dbs\mysql-8.0.29 C:\dbs\mysql-8.0.29>cd bin #登錄本機(jī) -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)的加密機(jī)制(caching_sha2_password)
必須使用admin用戶(在步驟4中建立的使用舊加密機(jī)制(mysql_native_password)的用戶)登錄
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
MySQL 使用 ORDER BY 排序和 DELETE 刪
這篇文章主要介紹了MySQL 使用 ORDER BY 排序和 DELETE 刪除記錄的操作過程,即數(shù)據(jù)庫查詢與數(shù)據(jù)操作,本文通過示例代碼給大家介紹的非常詳細(xì),需要的朋友參考下吧2023-11-11MySQL 數(shù)據(jù)查重、去重的實現(xiàn)語句
這篇文章主要介紹了MySQL 數(shù)據(jù)查重、去重的實現(xiàn)語句,幫助大家更好的理解和學(xué)習(xí)MySQL數(shù)據(jù)庫,感興趣的朋友可以了解下2020-09-09MySQL中having關(guān)鍵字詳解以及與where的區(qū)別
在MySQL中HAVING和WHERE是用于過濾數(shù)據(jù)的兩個重要的關(guān)鍵字,它們在查詢語句中的位置和功能有所不同,這篇文章主要給大家介紹了關(guān)于MySQL中having關(guān)鍵字詳解以及與where區(qū)別的相關(guān)資料,需要的朋友可以參考下2024-07-07Windows服務(wù)器下MySql數(shù)據(jù)庫單向主從備份詳細(xì)實現(xiàn)步驟分享
將主服務(wù)器中的MySql數(shù)據(jù)庫同步到從服務(wù)器中,使得對主服務(wù)器的操作可以即時更新到從服務(wù)器,避免主服務(wù)器因環(huán)境或者網(wǎng)絡(luò)異常一時無法使用,達(dá)到備份效果,這篇文章整理的確實挺詳細(xì)的2012-05-05