****前言****
今天實(shí)在時(shí)有空,了解過(guò)MySQL主從復(fù)制,雖然很簡(jiǎn)單奸忽,但是也要配置配置測(cè)試測(cè)試,想要至少兩臺(tái)的MySQL服務(wù)器揖庄,然而第一方法想到的就是Docker跑ubuntu容器栗菜,在ubuntu里面安裝MySQL服務(wù),雖然也可以使用騰云云服務(wù)器蹄梢,我偏偏就是不干疙筹,就是想學(xué)習(xí)掌握Docker應(yīng)用,其實(shí)我在32位主機(jī)玩Docker也是一種折騰禁炒。還是說(shuō)說(shuō)我的問(wèn)題吧~~~
apt-get install mysql-server mysql-common mysql-client
****出現(xiàn)的問(wèn)題****
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 13606 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.5_5.5.50-0ubuntu0.14.04.1_i386.deb ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Aborting downgrade from (at least) 5.6 to 5.5.
If are sure you want to downgrade to 5.5, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.50-0ubuntu0.14.04.1_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.50-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-server (5.5.50-0ubuntu0.14.04.1) ...
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.5_5.5.50-0ubuntu0.14.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
在網(wǎng)絡(luò)上而咆,同樣的問(wèn)題,相同的方案幕袱,我的卻不能解決暴备,我還以為是Docker里跑的問(wèn)題,好吧们豌,最好Google到了另一個(gè)解決方案涯捻。
****解決方案****
$apt-get purge mysql*
$apt-get autoremove
$apt-get autoclean
$apt-get dist-upgrade
$apt-get upgrade
$apt-get install mysql-server --fix-missing --fix-broken
搞掂!然而還是給出網(wǎng)上很主流我卻搞不掂的方案望迎,說(shuō)不定障癌。。辩尊。呢涛浙,嘿嘿!
sudo rm /var/lib/mysql/ -R
sudo rm /etc/mysql/ -R
sudo apt-get autoremove mysql* --purge
sudo apt-get remove apparmor
sudo apt-get install mysql-server mysql-common
****價(jià)值源于技術(shù)摄欲,貢獻(xiàn)源于分享****