简体   繁体   中英

Can't install mysql 5.6 on elementaryos

I need LAMP on my elementaryos. I already have php, apache, and phpmyadmin.

Mysql has proven to be a problem to me. I've successfully installed mysql 5.7 . Unfortunately, the people at mysql decided to add silly changes such as not being able to mysql -uroot -proot without sudo . Because of this change, I can't login via phpadmin with root.

So I've decided to just install mysql 5.6 .

I've been following this guide.

Sadly, when I do apt-cache policy mysql-server , this is what I get:

mysql-server:
  Installed: (none)
  Candidate: 5.7.23-0ubuntu0.18.04.1
  Version table:
     5.7.23-0ubuntu0.18.04.1 500
        500 http://ph.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://ph.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
     5.7.21-1ubuntu1 500
        500 http://ph.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://ph.archive.ubuntu.com/ubuntu bionic/main i386 Packages

The version is 5.7. So now the guide says check /etc/apt/sources.list.d/mysql.list . But this is what I have in there:

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt//ubuntu/ wily mysql-apt-config
deb http://repo.mysql.com/apt//ubuntu/ wily mysql-5.6

deb http://repo.mysql.com/apt//ubuntu/ wily mysql-tools
deb-src http://repo.mysql.com/apt//ubuntu/ wily mysql-5.6

So it's actually correct. But it's still not 5.6 .

Can anybody help me out?

1.In Software & Updates/Other Software added 14.04 repository:

deb http://archive.ubuntu.com/ubuntu trusty main

2.Installed mysql client and server:

sudo apt install mysql-server-5.6
sudo apt install mysql-client-5.6

Update: Before installing 5.6, make sure that no other mysql packages are present:

dpkg -l | grep mysql dpkg -l | grep mysql - returns list of mysql packages.

Use apt-get purge <package name> to purge them.

Source: 16.04 upgrade broke mysql-server

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM