溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

發(fā)布時間:2021-10-25 10:24:36 來源:億速云 閱讀:265 作者:柒染 欄目:大數(shù)據(jù)

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析,很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細(xì)講解,有這方面需求的人可以來學(xué)習(xí)下,希望你能有所收獲。

一、下載mysql

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

二、檢查mysql是否在windows環(huán)境變量path中,不在則把D:\phpStudy\MySQL\bin加入環(huán)境變量

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

   如何重啟設(shè)置path生效,請參考 https://my.oschina.net/u/1422143/blog/3227656

三、備份舊有mysql5.5

    注意:復(fù)制之前需要卸載mysql服務(wù)

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

1、卸載MySQL服務(wù)

mysqld remove

2、卸載MySQLa服務(wù)

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

    phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

  3、把下載的mysql8解壓到mysql目錄

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

4、安裝mysql8的服務(wù)

1)初始化并輸出默認(rèn)生成的密碼

mysqld --initialize --console

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

2)安裝mysql8服務(wù)

mysqld install

3)安裝phpStudy的MySQLa服務(wù)

phpStudy2016 mysql5.5升級mysql8的實(shí)例分析

四、創(chuàng)建D:\phpStudy\MySQL\my.ini

[mysql]
default-character-set=utf8

[mysqld]
port=3306
default_authentication_plugin=mysql_native_password
basedir=D:/phpStudy/MySQL/
datadir=D:/phpStudy/MySQL/data/
character-set-server=utf8
default-storage-engine=InnoDB
collation-server=utf8_unicode_ci
init_connect='SET NAMES utf8'
innodb_buffer_pool_size=64M
innodb_flush_log_at_trx_commit=1
innodb_lock_wait_timeout=120
innodb_log_buffer_size=4M
innodb_log_file_size=256M
interactive_timeout=120
join_buffer_size=2M
key_buffer_size=32M
log-error="D:/phpStudy/MySQL/data"
log_error_verbosity=1
max_allowed_packet=16M
max_connections=1000
max_heap_table_size=64M
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=32M
read_buffer_size=512kb
read_rnd_buffer_size=4M
server_id=1
skip-external-locking=on
sort_buffer_size=256kb
table_open_cache=256
thread_cache_size=16
tmp_table_size=64M
wait_timeout=120
sql-mode="STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY"
[client]
port=3306
default-character-set=utf8

五、重新設(shè)置mysql密碼

打開mysql

alter user 'root'@'localhost' identified with mysql_native_password by 'root';

exit退出,重連啟動即可

看完上述內(nèi)容是否對您有幫助呢?如果還想對相關(guān)知識有進(jìn)一步的了解或閱讀更多相關(guān)文章,請關(guān)注億速云行業(yè)資訊頻道,感謝您對億速云的支持。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI