mysql 5.7.14 免安裝版注意事項(xiàng)(精)
相關(guān)閱讀:
Mysql 5.7.14 使用常見(jiàn)問(wèn)題匯總(推薦)
1、解壓
2、在目錄D:\Program Files\mysql-5.7.14-winx64下復(fù)制my-default.ini,放在與其相同目錄下,名稱顯示為my.ini;
3、編輯my.ini
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [client] default-character-set=utf8 [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. basedir = D:\Program Files\mysql-5.7.14-winx64 datadir = D:\Program Files\mysql-5.7.14-winx64\data tmpdir = D:\Program Files\mysql-5.7.14-winx64\data socket = D:\Program Files\mysql-5.7.14-winx64\data\mysql.sock port = 3306 # server_id = ..... max_connections = 100 table_open_cache = 256 query_cache_size = 1M tmp_table_size = 32M thread_cache_size = 8 innodb_data_home_dir = D:\Program Files\mysql-5.7.14-winx64\data innodb_flush_log_at_trx_commit = 1 innodb_log_buffer_size = 128M innodb_buffer_pool_size = 128M innodb_log_file_size = 10M innodb_thread_concurrency = 16 innodb-autoextend-increment = 1000 # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M join_buffer_size = 128M sort_buffer_size = 32M read_rnd_buffer_size = 32M max_allowed_packet = 32M explicit_defaults_for_timestamp = true sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
4、在解壓目錄D:\Program Files\mysql-5.7.14-winx64下新建data文件(不用在文件夾做其他操作)
5、以管理員身份進(jìn)入cmd界面(必須是管理員)
6、切換至mysql解壓目錄\bin下,初始化data目錄
輸入命令:mysqld --initialize-insecure (生成無(wú)密碼的root用戶)
或:mysqld --initialize(生成帶隨機(jī)密碼的root用戶)
7、初始化完成后啟動(dòng)mysql服務(wù)
輸入命令:net start mysql
8、開(kāi)始使用mysql
輸入命令:mysql -u root -p
9、停止mysql服務(wù)
輸入命令:net stop mysql
10、忘記root密碼后如何登錄
101、 關(guān)閉正在運(yùn)行的MySQL服務(wù)。
10.2、 打開(kāi)DOS窗口,轉(zhuǎn)到mysql\bin目錄。
10.3、輸入mysqld --skip-grant-tables 回車。--skip-grant-tables 的意思是啟動(dòng)MySQL服務(wù)的時(shí)候跳過(guò)權(quán)限表認(rèn)證。
10.4、再開(kāi)一個(gè)DOS窗口(因?yàn)閯偛拍莻€(gè)DOS窗口已經(jīng)不能動(dòng)了),轉(zhuǎn)到mysql\bin目錄。
10.5、輸入mysql回車,如果成功,將出現(xiàn)MySQL提示符 >。
10.6、連接權(quán)限數(shù)據(jù)庫(kù): use mysql; 。
10.7、改密碼:update user set password=password("123") where user="root";(別忘了最后加分號(hào)) 。
10.8、刷新權(quán)限(必須步驟):flush privileges; 。
10.9、 退出 quit。
10.10、注銷系統(tǒng),再進(jìn)入,使用用戶名root和剛才設(shè)置的新密碼123登錄。
11、修改root用戶密碼
5.7版本以前:
update user set authentication_string =password( 'root') where user = 'root;
5.7版本以后:
update user set password=password( 'root') where user = 'root;
以上所述是小編給大家介紹的mysql 5.7.14 免安裝版注意事項(xiàng)(精),希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
MySQL ClickHouse不同于SQL的語(yǔ)法介紹
CloudCanal 近期實(shí)現(xiàn)了 MySQL(RDS) 到 ClickHouse 實(shí)時(shí)同步的能力,功能包含全量數(shù)據(jù)遷移、增量數(shù)據(jù)遷移、結(jié)構(gòu)遷移能力,以及附帶的監(jiān)控、告警、HA等能力2022-11-11MySQL批量導(dǎo)入Excel數(shù)據(jù)(超詳細(xì))
這篇文章主要介紹了MySQL批量導(dǎo)入Excel數(shù)據(jù)(超詳細(xì)),文章圍繞主題展開(kāi)詳細(xì)的內(nèi)容介紹,具有一定的參考價(jià)值,感興趣的小伙伴可以參考一下,希望對(duì)你的學(xué)習(xí)有所幫助2022-08-08MySQL數(shù)據(jù)庫(kù)遷移data文件夾位置詳細(xì)步驟
這篇文章主要介紹了MySQL數(shù)據(jù)庫(kù)遷移data文件夾詳細(xì)步驟,需要的朋友可以參考下2014-03-03登錄mysql時(shí)出現(xiàn)的閃退問(wèn)題解決
大家在打開(kāi)MySQL時(shí),可能會(huì)遇到在登陸界面輸入密碼之后就閃退的這個(gè)問(wèn)題,下面這篇文章主要給大家介紹了關(guān)于如何解決登錄mysql時(shí)出現(xiàn)的閃退問(wèn)題的相關(guān)資料,需要的朋友可以參考下2023-05-05關(guān)于Mysql中json數(shù)據(jù)類型的查詢操作指南
mysql在5.7版本之后就開(kāi)始支持json數(shù)據(jù)類型,并且mysql8.0版本對(duì)json的處理已經(jīng)做的非常完善了,json數(shù)據(jù)類型的優(yōu)點(diǎn)缺點(diǎn)可自己查詢,本文主要介紹一些關(guān)于json數(shù)據(jù)類型的查詢操作2023-07-07mysql查詢字符串中某個(gè)字符串出現(xiàn)的次數(shù)(實(shí)例詳解)
這篇文章主要介紹了mysql查詢字符串中某個(gè)字符串出現(xiàn)的次數(shù),本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-04-04MySQL5創(chuàng)建存儲(chǔ)過(guò)程的示例
存儲(chǔ)過(guò)程可以一次執(zhí)行多個(gè)sql語(yǔ)句,所以php只連接數(shù)據(jù)庫(kù)一次就能查詢多個(gè)語(yǔ)句;不過(guò)要返回多個(gè)結(jié)果集就必須用mysqli擴(kuò)展來(lái)查詢,否則會(huì)提示錯(cuò)誤can't return a result set in the given context2008-09-09探討:MySQL中如何查詢當(dāng)前正在運(yùn)行的SQL語(yǔ)句
本篇文章是對(duì)在MySQL中如何查詢當(dāng)前正在運(yùn)行的SQL語(yǔ)句進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-06-06詳解MySQL子查詢(嵌套查詢)、聯(lián)結(jié)表、組合查詢
這篇文章主要介紹了MySQL子查詢(嵌套查詢)、聯(lián)結(jié)表、組合查詢,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2019-03-03