ubuntu22.04安装mysql8.1全过程

2023年9月7日 10:37 by wst

database

今天购买了腾讯云的轻量服务器,选择的是ubuntu22.04系统。

然后接着安装mysql8.1,现在是2023.9.7日。mysql的版本算是最新的了。

系统环境

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

安装步骤

1. 更新系统

# 更新软件列表:
sudo apt-get update
# 更新软件包:
sudo apt-get upgrade

如果之前安装过mysql,按如下步骤卸载。

先依次执行下面的语句:

i. sudo apt-get autoremove --purge mysql-server

ii. sudo apt-get remove mysql-server

iii. sudo apt-get autoremove mysql-server

iv. sudo apt-get remove mysql-common

清理残留数据

dpkg -l |grep ^rc|awk ‘{print $2}’ |sudo xargs dpkg -P

如果出现以下错误,证明你的系统中没有残留配置文件了,无须担心

2. 下载安装包

不要一个个下载,它们有个打包好的总包。地址:https://cdn.mysql.com//Downloads/MySQL-8.1/mysql-server_8.1.0-1ubuntu22.04_amd64.deb-bundle.tar

下载完后,记得解压:

tar xvf mysql-server_8.1.0-1ubuntu22.04_amd64.deb-bundle.tar

3. 安装MySQL

依次执行如下命令:

sudo dpkg -i mysql-common_8.1.0-1ubuntu22.04_amd64.deb
sudo dpkg -i mysql-community-client-plugins_8.1.0-1ubuntu22.04_amd64.deb
sudo dpkg -i libmysqlclient22_8.1.0-1ubuntu22.04_amd64.deb
sudo dpkg -i mysql-community-client-core_8.1.0-1ubuntu22.04_amd64.deb
sudo dpkg -i mysql-community-client_8.1.0-1ubuntu22.04_amd64.deb
# 执行到这一步,mysql已可用。加密方式选第二种。
sudo apt install libmecab2
# 下面的不知有没有用,防止出错,也都安了。
sudo dpkg -i mysql-community-server-core_8.1.0-1ubuntu22.04_amd64.deb
sudo dpkg -i mysql-community-server_8.1.0-1ubuntu22.04_amd64.deb
sudo dpkg -i mysql-server_8.1.0-1ubuntu22.04_amd64.deb

常用MySQL语句

为了方便读者,这里贴出创建用户和库的语句:

-- 创建库frontend
create database frontend charset utf8MB4 collate utf8mb4_unicode_ci;
-- 创建用户frontend
CREATE USER "frontend"@"%" IDENTIFIED BY "Front0nd"; 
-- 给用户赋权访问frontend
grant all privileges on frontend.* to "frontend"@"%"; 

上面的安装步骤都是自己摸索出来的,记录自己,也方便后来人。

如有问题,欢迎留言!


Comments(127) Add Your Comment

Kojuwg
oral atorvastatin 20mg <a href="https://lipiws.top/">atorvastatin 40mg canada</a> lipitor 10mg oral
Vvpqsg
buy ciprofloxacin 1000mg sale - <a href="https://cipropro.top/">buy cipro generic</a> order augmentin 625mg without prescription
Jajkpi
cost ciprofloxacin - <a href="https://metroagyl.top/oxytetracycline/">order myambutol 600mg without prescription</a> augmentin order
Zphojq
ciprofloxacin where to buy - <a href="https://septrim.top/chloromycetin/">order chloramphenicol online</a> erythromycin 500mg without prescription
Cqvpxl
flagyl drug - <a href="https://metroagyl.top/keflexcapsule/">amoxicillin canada</a> azithromycin 250mg uk
Cfzjhh
stromectol for sale - <a href="https://keflexin.top/tetracycline/">sumycin 500mg oral</a> tetracycline over the counter
Csqpxe
valtrex 1000mg usa - <a href="https://gnantiviralp.com/zovirax/">acyclovir 800mg drug</a> acyclovir cost
Gjrebi
buy ampicillin without prescription <a href="https://ampiacil.top/amoxil500/">where can i buy amoxicillin</a> amoxicillin tablets
Nwkbpt
flagyl brand - <a href="https://metroagyl.top/cefaclor/">order cefaclor capsules</a> order zithromax 250mg sale
Naztag
purchase lasix online cheap - <a href="https://antipathogenc.com/capoten/">buy capoten 25 mg</a> captopril usa
Crohsj
buy glucophage generic - <a href="https://gnantiacidity.com/">buy generic glucophage over the counter</a> buy lincomycin without prescription
Nksgiy
buy retrovir no prescription - <a href="https://canadiangnp.com/zyloprim/"></a> zyloprim online buy
Edwlvh
buy clozaril pill - <a href="https://genonlinep.com/amaryl/">oral glimepiride 4mg</a> buy pepcid 40mg without prescription
Qbzwjb
generic clomipramine - <a href="https://antdeponline.com/paxil/">buy paroxetine 10mg without prescription</a> buy doxepin 25mg without prescription
Ayvgwd
quetiapine order - <a href="https://gnkantdepres.com/zoloft/">buy sertraline 100mg generic</a> eskalith online order
Yebjlt
purchase hydroxyzine without prescription - <a href="https://antdepls.com/buspar/">buspirone uk</a> buy amitriptyline online cheap
Qspazh
amoxiclav over the counter - <a href="https://atbioinfo.com/ampicillin/">ampicillin online order</a> baycip online
Npolon
amoxicillin tablets - <a href="https://atbioxotc.com/trimox/">trimox oral</a> cheap cipro 1000mg
Cvkvzs
order azithromycin 500mg generic - <a href="https://gncatbp.com/btetracycline/">tetracycline 250mg ca</a> purchase ciprofloxacin sale
Muyzxn
buy cleocin 150mg generic - <a href="https://cadbiot.com/chloramphenicol/">buy generic chloromycetin online</a> purchase chloromycetin online cheap
Vapoll
ivermectin 6 mg oral - <a href="https://antibpl.com/szdoryx/">doxycycline tablets</a> cefaclor 250mg drug
Cjpfdg
albuterol online - <a href="https://antxallergic.com/advairdiskus/">order fluticasone sale</a> pill theophylline 400mg
Cqwqlp
buy medrol usa - <a href="https://ntallegpl.com/getazelastine/">azelastine 10 ml generic</a> azelastine 10 ml cost
Srvklu
clarinex cheap - <a href="https://rxtallerg.com/beclomethasone/">buy beclamethasone medication</a> buy ventolin inhalator without prescription
Xavldz
glyburide 5mg sale - <a href="https://prodeprpl.com/pioglitazone30/">order actos 15mg online cheap</a> cost dapagliflozin 10 mg
Qycaqc
metformin 1000mg generic - <a href="https://arxdepress.com/">order glycomet online cheap</a> precose 25mg uk
Vitsqs
order prandin 1mg for sale - <a href="https://depressinfo.com/jardiance25/">generic empagliflozin 25mg</a> order empagliflozin 25mg sale
Epkzbk
rybelsus 14mg drug - <a href="https://infodeppl.com/glucovance5/">glucovance over the counter</a> order DDAVP online cheap
Ddzfgm
terbinafine generic - <a href="https://treatfungusx.com/">order lamisil pill</a> grifulvin v us
Xgnmkn
ketoconazole 200mg for sale - <a href="https://antifungusrp.com/butenafinecream/">buy butenafine sale</a> sporanox 100mg sale
Ppfsdd
buy famciclovir 250mg for sale - <a href="https://amvinherpes.com/">how to get famciclovir without a prescription</a> valaciclovir 500mg drug
Torlbq
digoxin oral - <a href="https://blpressureok.com/avalidemed/">avapro 150mg drug</a> brand furosemide 40mg
Ppadba
metoprolol 100mg us - <a href="https://bloodpresspl.com/hyzaar/">buy losartan online cheap</a> adalat order online
Vfmgiy
hydrochlorothiazide 25 mg for sale - <a href="https://norvapril.com/amlodipine/">order norvasc 10mg generic</a> order bisoprolol 5mg generic
Lkimwh
order nitroglycerin generic - <a href="https://nitroproxl.com/">where to buy nitroglycerin without a prescription</a> buy diovan paypal
Lpxzkr
zocor effect - <a href="https://canescholest.com/gemfibrozil/">lopid creak</a> atorvastatin wither
Fkjiyi
rosuvastatin online either - <a href="https://antcholesterol.com/pravastatin/">pravastatin universal</a> caduet proud
Mfnjhz
viagra professional online park - <a href="https://edsildps.com/">viagra professional chamber</a> levitra oral jelly online frantic
Fgjyir
priligy funeral - <a href="https://promedprili.com/cialiswithdapoxetine/">cialis with dapoxetine wear</a> cialis with dapoxetine cook
Niwkcv
cenforce online cheerful - <a href="https://xcenforcem.com/levitraprofessional/">levitra professional online unicorn</a> brand viagra online reality
Cumioq
brand cialis fireplace - <a href="https://probrandtad.com/tadorapills/">tadora wink</a> penisole engine
Odthgj
brand cialis proper - <a href="https://probrandtad.com/apcalissx/">apcalis sport</a> penisole crown
Scxubi
cialis soft tabs agreeable - <a href="https://supervalip.com/levitrasoft/">levitra soft knight</a> viagra oral jelly online breathe
Jvikpv
cialis soft tabs online title - <a href="https://supervalip.com/">cialis soft tabs pills instruction</a> viagra oral jelly online glove
Wabyil
dapoxetine place - <a href="https://promedprili.com/cialiswithdapoxetine/">cialis with dapoxetine sheet</a> cialis with dapoxetine musical
Qaekns
cenforce online elf - <a href="https://xcenforcem.com/cialistadalafil/">daily cialis</a> brand viagra pills represent
Yftwpc
asthma treatment dormitory - <a href="https://bsasthmaps.com/">asthma treatment court</a> asthma medication ridiculous
Qbuezf
acne medication file - <a href="https://placnemedx.com/">acne medication kid</a> acne treatment hunter
Beylej
pills for treat prostatitis general - <a href="https://xprosttreat.com/">prostatitis medications time</a> prostatitis medications length
Rhvjte
uti medication permission - <a href="https://amenahealthp.com/">uti treatment shirt</a> uti medication cousin
Kqacbi
loratadine medication noon - <a href="https://clatadine.top/">loratadine medication adult</a> claritin pills gay
Cjodag
valtrex pills put - <a href="https://gnantiviralp.com/">valacyclovir want</a> valacyclovir wall
Oqggfm
dapoxetine fang - <a href="https://prilixgn.top/">priligy peep</a> priligy remind
Yrnpln
claritin pills god - <a href="https://clatadine.top/">claritin pills wary</a> claritin valley
Afybre
ascorbic acid love - <a href="https://ascxacid.com/">ascorbic acid column</a> ascorbic acid evil
Biyojf
promethazine mess - <a href="https://prohnrg.com/">promethazine amount</a> promethazine ball
Hgjnoi
biaxin pills flight - <a href="https://gastropls.com/">biaxin pills swing</a> cytotec request
Rgkpux
fludrocortisone pills okay - <a href="https://gastroplusp.com/omepprilosec/">prilosec pills caution</a> prevacid description
Uqxsjr
buy aciphex 20mg pills - <a href="https://gastrointesl.com/metoclopramide/">metoclopramide without prescription</a> purchase domperidone pills
Vodblv
buy dulcolax 5 mg sale - <a href="https://gastroinfop.com/loperamide/">loperamide order online</a> buy liv52 10mg generic
Nzyrpp
zovirax online - <a href="https://cerazestrel.com/">buy desogestrel 0.075mg sale</a> buy dydrogesterone pills
Zpoapc
purchase cotrimoxazole without prescription - <a href="https://cotrioxazo.com/">cheap bactrim</a> tobrex 5mg us
Ecogsk
fulvicin 250 mg uk - <a href="https://fulviseoful.com/">griseofulvin 250 mg cost</a> order gemfibrozil 300mg generic
Ppphpy
buy forxiga online - <a href="https://forpaglif.com/">dapagliflozin 10 mg ca</a> precose 50mg brand
Cbhnjf
generic dimenhydrinate - <a href="https://prasilx.com/">buy prasugrel 10mg pills</a> buy risedronate 35 mg online
Kvaozq
buy generic enalapril - <a href="https://vasolapril.com/">enalapril online order</a> order latanoprost eye drops
Bnpbpc
buy generic etodolac for sale - <a href="https://cilosetal.com/">buy pletal 100mg generic</a> order pletal 100mg generic
Jqawgt
piroxicam order online - <a href="https://feldexicam.com/">feldene 20mg ca</a> order generic rivastigmine 6mg
Yzcdpd
nootropil pills - <a href="https://nootquin.com/sinemet/">sinemet 20mg canada</a> sinemet 20mg brand
Imksll
hydrea generic - <a href="https://hydroydrinfo.com/pentoxifylline/">buy trental pills</a> order robaxin pills
Bgryze
depakote 500mg ca - <a href="https://adepamox.com/mefloquine/">mefloquine canada</a> buy topiramate generic
Kphpip
order disopyramide phosphate sale - <a href="https://anorpica.com/lamivudine/">buy epivir no prescription</a> how to buy thorazine
Weooev
order aldactone 25mg generic - <a href="https://aldantinep.com/dipyridamole/">persantine ca</a> revia 50 mg pills
Wmtbux
buy cytoxan sale - <a href="https://cycloxalp.com/trimetazidine/">order vastarel</a> vastarel cost
Cjdyxc
order cyclobenzaprine 15mg for sale - <a href="https://abflequine.com/prasugrel/">buy prasugrel 10 mg pills</a> order enalapril 10mg for sale
Tzpxju
zofran 8mg pill - <a href="https://azofarininfo.com/procyclidine/">procyclidine order online</a> order ropinirole 1mg without prescription
Htlfac
ascorbic acid without prescription - <a href="https://mdacidinfo.com/ferroussulfate/">brand ferrous 100 mg</a> compro for sale online
Grugsh
where can i order durex gel - <a href="https://xalaplinfo.com/latanoprosteyedrops/">buy latanoprost medication</a> where can i buy zovirax
Hvhyng
cheap rogaine generic - <a href="https://hairlossmedinfo.com/finasteridepros/">proscar canada</a> finasteride online
Hihenu
buy arava paypal - <a href="https://infohealthybones.com/cartidin/">buy cartidin pill</a> cartidin where to buy
Yarsvg
calan 120mg pills - <a href="https://infoheartdisea.com/">buy verapamil for sale</a> where can i buy tenoretic
Ebntmk
atenolol 50mg drug - <a href="https://heartmedinfox.com/sotalol/">pill sotalol 40 mg</a> coreg 25mg tablet
Finxwl
order atorlip sale - <a href="https://infoxheartmed.com/">how to get atorvastatin without a prescription</a> buy nebivolol 5mg
Iiemsx
cheap gasex online - <a href="https://herbalinfomez.com/">buy generic gasex</a> buy cheap generic diabecon
Sliuym
order lasuna generic - <a href="https://infoherbalmz.com/diarex/">purchase diarex generic</a> himcolin where to buy
Qxcjtc
buy generic norfloxacin for sale - <a href="https://gmenshth.com/confido/">confido pills</a> confido for sale online
Bjbcgl
buy finax online cheap - <a href="https://finmenura.com/doxazosin/">buy generic doxazosin over the counter</a> where to buy uroxatral without a prescription
Lnusbe
purchase speman - <a href="https://spmensht.com/">cheap speman tablets</a> buy finasteride generic
Qntbfy
order hytrin online - <a href="https://hymenmax.com/dapoxetine/">buy priligy 60mg online</a> dapoxetine 30mg over the counter
Qjlmlr
buy trileptal generic - <a href="https://trileoxine.com/pirfenidone/">purchase pirfenex generic</a> synthroid 100mcg canada
Rtrdrf
brand cyclosporine - <a href="https://asimusxate.com/methotrexate/">buy methotrexate 5mg pill</a> order colcrys online cheap
Oghkmd
lactulose buy online - <a href="https://duphalinfo.com/betahistine/">buy betahistine generic</a> buy betahistine without prescription
Yxexin
buy calcort without prescription - <a href="https://lazacort.com/brimonidine/">buy generic alphagan for sale</a> brimonidine over the counter
Deeiyn
besivance oral - <a href="https://besifxcist.com/">buy generic besifloxacin over the counter</a> sildamax brand
Apyemn
order gabapentin 800mg for sale - <a href="https://aneutrin.com/">purchase gabapentin sale</a> buy azulfidine 500mg online
Ntqyrb
how to buy benemid - <a href="https://bendoltol.com/">probalan online</a> order tegretol 200mg generic
Wuyydk
buy mebeverine without a prescription - <a href="https://coloxia.com/etoricoxib/">buy arcoxia paypal</a> how to get pletal without a prescription
Usjpti
buy celebrex generic - <a href="https://celespas.com/indomethacin/">indomethacin 75mg for sale</a> indocin 50mg without prescription
Bbsfjc
diclofenac 100mg tablet - <a href="https://dicloltarin.com/">brand voltaren 50mg</a> aspirin 75mg sale
Yqmdxv
purchase rumalaya - <a href="https://rumaxtol.com/shallaki/">buy generic shallaki online</a> amitriptyline price
Dfmlqk
cheap mestinon - <a href="https://mestonsx.com/azathioprine/">generic azathioprine</a> buy imuran 50mg pills
Igizxk
brand diclofenac - <a href="https://vovetosa.com/tisosorbide/">isosorbide 20mg tablet</a> order nimotop for sale
Jfajrv
ozobax without prescription - <a href="https://baclion.com/nspiroxicam/">buy feldene 20 mg online cheap</a> buy generic piroxicam online
Qgyabx
meloxicam without prescription - <a href="https://meloxiptan.com/rtrizatriptan/">buy toradol cheap</a> order toradol for sale
Hdarvy
order periactin 4 mg - <a href="https://periheptadn.com/">cyproheptadine 4 mg us</a> order generic tizanidine
Wfyuiw
trihexyphenidyl order online - <a href="https://voltapll.com/diclofenacgel/">order voltaren gel cheap</a> purchase cheap emulgel
Jkfzmm
order omnicef 300mg generic - <a href="https://omnixcin.com/">purchase cefdinir generic</a> purchase cleocin generic
Heoxkm
order accutane generic - <a href="https://aisotane.com/">buy isotretinoin 40mg</a> order deltasone 20mg
Ztvzbd
prednisone 10mg brand - <a href="https://apreplson.com/">deltasone brand</a> zovirax canada
Blqxgf
buy permethrin generic - <a href="https://actizacs.com/asbenzac/">benzoyl peroxide buy online</a> order tretinoin sale
Sdvwso
order betnovate 20gm online - <a href="https://betnoson.com/awdifferin/">buy differin for sale</a> monobenzone where to buy
Pgelfp
order metronidazole without prescription - <a href="https://ametronles.com/">buy flagyl 400mg sale</a> buy generic cenforce online
Rbhhvs
buy clindamycin without prescription - <a href="https://clinycinpl.com/">buy cleocin 150mg</a> indocin 75mg price
Sakysz
buy generic losartan 25mg - <a href="https://acephacrsa.com/">cephalexin 125mg generic</a> order cephalexin 250mg without prescription
Vvdvxj
buy eurax generic - <a href="https://aeuracream.com/caczone/">aczone cheap</a> order aczone without prescription
Guunvq
order zyban 150 mg online - <a href="https://bupropsl.com/">zyban 150mg price</a> shuddha guggulu cost
Yzyfyc
order modafinil 100mg generic - <a href="https://sleepagil.com/">order modafinil 100mg generic</a> melatonin 3 mg drug
Xlxmbt
order generic progesterone - <a href="https://apromid.com/clomiphene/">generic serophene</a> buy fertomid
Fajwsm
xeloda 500mg oral - <a href="https://xelocap.com/naproxen/">brand naproxen 250mg</a> order danazol 100 mg sale
Jnwovz
order norethindrone online cheap - <a href="https://norethgep.com/lumigan/">lumigan eye drops</a> order yasmin generic
Sizpjt
alendronate 35mg tablet - <a href="https://pilaxmax.com/pilex/">pilex pills</a> medroxyprogesterone 10mg oral
Hbfrpa
buy cabergoline generic - <a href="https://adostilin.com/alesse/">buy alesse online</a> buy alesse tablets
Quyhzz
order estrace 1mg online cheap - <a href="https://festrolp.com/ginette-35/">buy ginette 35 for sale</a> arimidex 1 mg pills
Vebnnu
シルデナフィル どこで買える - <a href="https://jpedpharm.com/">バイアグラ 市販 おすすめ</a> タダラフィルの購入
Kntyak
プレドニン の購入 - <a href="https://jpaonlinep.com/">プレドニン 個人輸入 おすすめ</a> アジスロマイシンの購入
Hljbfw
プレドニン錠 5 mg 強さ - <a href="https://jpanfarap.com/jpaaccutane/">イソトレチノイン錠 20 mg 強さ</a> イソトレチノイン どこで買える
Kvmgvb
eriacta gracious - <a href="https://eriagra.com/fforzestf/">forzest shelter</a> forzest declare