Downgrade Mysql 5.5.9 to 5.1 on Ubuntu 14.04 - mysql

After upgrading to Ubuntu 14.04 Mysql 5.5.9 is incompatible with some of my scripts. I need to re-install Mysql 5.1. I tried research online but no luck
When I do
apt-get install mysql-server-5.1 mysql-client-5.1
Package mysql-server-5.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mysql-server-core-5.5:i386 mysql-server-5.5:i386 mysql-server-core-5.5
mysql-server-5.5
E: Package 'mysql-server-5.1' has no installation candidate
E: Package 'mysql-client-5.1' has no installation candidate
Tried to find multiverse source but no luck,
Anyone?

Uninstall existing mysql
sudo apt-get remove mysql-server
Download the MySQL APT repository config tool (as root)
wget http://dev.mysql.com/get/mysql-apt-config_0.3.5-1debian8_all.deb
Install the MySQL APT repository config tool
dpkg -i mysql-apt-config_0.3.5-1debian8_all.deb
Update APT
apt-get update
Install the server
apt-get install mysql-community-server
Thereby you can select the server you need and install

Related

Installing workbench on ubuntu

I am trying to install MySQL Workbench on Ubuntu 20.04, and I run these commands:
sudo apt-get update && sudo apt-get upgrade
sudo apt install mysql-workbench
the error is:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql-workbench
I used this way to install before but now I do not know what to do, please help, I am new in Ubuntu.
try this:
download snapd service using apt-get
sudo apt-get install snapd
after that install workbench
sudo snap install mysql-workbench-community
when it's done You need to enter a command to allow this package to access the service. The command is:
sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service
You have to add the repository in your source.list file:
echo "deb http://repo.mysql.com/apt/ubuntu/ eoan mysql-tools" | sudo tee /etc/apt/sources.list.d/mysql.list
then:
sudo apt update
sudo apt install mysql-workbench-community
MySQL has updated their repository for Focal Fossa and removed the repository for Eoan Ermine. To install MySQL Workbench on 20.04, either download the Workbench for 20.04 from MySQL archives or follow the alternate method mentioned below replacing eoan with focal.
Refer this:
https://askubuntu.com/questions/1230752/mysql-workbench-not-supporting-with-ubuntu-20-04-lts

How to forcefully remove MySQL and MariaDB from Ubuntu 16.04, without `apt-get` and `dpkg`?

By wrong uninstalling MariaDB, I've lost working instance of MySQL and MariaDB in my Ubuntu 16.04 system...
I've broken the dependencies so much, that I can not uninstall or install MySQL or MariaDB, using apt-get, or dpkg...
All the following commands failed:
apt-get [install -f] [update] [remove] [purge] [autorove] [clean] [check]
and options with dpkg such as:
dpkg --remove --force-remove-reinstreq mysql
also don't help me.
Manually downloading the package and attempting to install from a local file did not help.
For each installation, uninstallation or other attempt, I get almost the same result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
mariadb-client : Depends: mariadb-client-10.0 (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
mariadb-server-10.0 : PreDepends: mariadb-common (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
Depends: mariadb-client-10.0 (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
Breaks: mysql-server
mariadb-server-core-10.0 : Depends: mariadb-common (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
mysql-server : Depends: mysql-community-server (= 5.7.22-1ubuntu16.04) but it is not installed
E: Unmet dependencies. Try using -f.
Is there any different way to permanently remove any traces and remnants of MySQL and MariaDB from the operating system, so that I can reinstall MySQL itself?
I need to working with MySQL, but I can't reinstall the operating system.
Please help me.
God exists! :D
The problem was solved by entering:
sudo apt-get -f install
without any other parameters
and later displaying all packages via:
sudo dpkg -l | grep mariadb
sudo dpkg -l | grep mysql
and removing problematic packages in the right order:
sudo apt-get --purge autoremove package_name
After the complete removal of all problematic packages, I could re-install MySQL without any problems...
Thank you #YuriLachin for your help.
It is probably better to address the question to serverfault.com.
Run:
dpkg --audit
to find what is broken.
Then run:
dpkg --list|grep -i mysql
and
dpkg --list|grep -i mariadb
Look at the first (status) column and, optionally, inspect detailed status for some of packages with:
dpkg-info -s <name-of-package>
Then you can try to remove found mysql/mariadb related packages with
dpkg -remove --force-remove-reinstreq <package-list>
As a way around you can always run mysq in docker container without mysql being installed

Not able to install mysql workbench on ubuntu 16.04

while installing MYSQL workbench from software center, the system shutdown due to a power cut.
After I powered it back up, when I try to install the workbench again, it does not install and when I try to install it from command line using
sudo apt-get install mysql-workbench
I get following error.
The following packages have unmet dependencies: mysql-workbench :
Depends: libgdal.so.1-1.11.3 Depends: libgdal1i (>= 1.8.0) but it is
not going to be installed E: Unable to correct problems, you have held
broken packages.
Please help to install it on ubuntu 16.04
I had the exact same problem. I was not able to install it using apt-get, but I had no problem doing so with the .deb file:
Go to mysql-workbench download site
Select Platform > Ubuntu Linux > Download
No thanks, just start my download.
Open the deb file downloaded
Click Install
I hope this works for you too.
https://dev.mysql.com/downloads/repo/apt/
Download apt repository
Select “No thanks, just start my download“
2)install sudo apt install ./mysql-apt-config_0.8.15-1_all.deb
3)During the installation, we will be prompted by dialog box,click ‘OK’ to continue MySQL Workbench installation.
4)update apt
sudo apt update
5)install workbench
sudo apt install mysql-workbench-community
6)To launch run mysql-workbench
list held packages : apt-mark showhold
then
get them out of held state: apt-mark unhold
then remove them. then try your main install again.
on Ubuntu 19
1)I had to preceding it on Ubuntu 19 also install manually a library libzip
https://ubuntu.pkgs.org/18.10/ubuntu-universe-amd64/libzip4_1.1.2-1.1_amd64.deb.html
2) then manually selecting on download page deb package for mysql workbench
https://dev.mysql.com/downloads/workbench/
then install deb packages via standard apt installer in Downloads dir
sudo apt install ./libzip4_1.1.2-1.1_amd64.deb
and downloaded workbench deb package
sudo apt install ./mysql-workbench-community_8.0.16-1ubuntu18.04_amd64.deb

Installation of MySQL 5.7 on Debian 7 Wheezy

I would like to install MySql 5.7 on Debian 7 Wheezy. I put :
deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.7
in file:
/etc/apt/sources.list.d/mysql.list
Next I run commands:
sudo apt-get update
sudo apt-get upgrade
And tried install package:
sudo apt-get install mysql-server-5.7
I got an error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mysql-community-server' instead of 'mysql-server-5.7'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-community-server : Depends: mysql-common (= 5.7.11-1debian7) but 5.5.47-0+deb7u1 is to be installed
Depends: mysql-client (= 5.7.11-1debian7)
E: Unable to correct problems, you have held broken packages.
Do you have any ideas to resolve this problem?
I also tried:
Note, selecting 'mysql-community-server' instead of 'mysql-server-5.7'
But it's not the solution of the problem.
I stumbled upon this post and can confirm simply changing the priority of your cache by downloading the .deb package directly from MySQL Downloads
Using the command line:
$ cd /usr/src && sudo wget http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
Please note: by convension the /src directory on linux exists for source code to live before being compiled - I believe the deb package above therefore belongs here.
This works for Debian/Wheezy.
$ sudo dpkg -i http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
Once this you have gone through the steps, you simply hit Ok, and then proceed to install mysql-server like normal:
$ sudo apt-update
$ sudo apt-get install mysql-server
For me, this resulted in the following:
[info] MySQL Community Server 5.7.14 is started.
Setting up mysql-server (5.7.14-1debian7) ...
Further reading, if you ever want to remove this package, you can do so:
$ cd /usr/src && sudo dpkg --remove http://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb
As of 2020 with Debian Wheezy 7.11 the answer doesn't work anymore. I had to change a few things and thought it might be useful to share the result:
Install mysql-apt-config_0.8.10-1_all.deb (Version 0.8.15-1_all won't work: dpkg can't handle the "control.tar.xz" it contains.)
cd /usr/src
sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
This will create the necessary /etc/apt/sources.list.d/mysql.list file.
sudo apt-get update
sudo apt-get install mysql-server
Thanks goes to David Kehr from where I got the working mysql-apt-config version.
You don't need to specify the version in the apt-get command, just type :
sudo apt-get install mysql-server
After the install, you can type the following command to check mysql version
aptitude show mysql-server
On my machine I have the following result :
...
Version : 5.7.13-1debian7
...

Can't find nor install mysql_config

I get this error from Inspircd
Can't exec "mysql_config": No such file or directory at /home/alpha/inspircd-2.0.19/make/utilities.pm line 392, <FLAGS> line 37.
Make sure you have pkg-config installed
In the case of gnutls configuration errors on debian,
Ubuntu, etc, you should ensure that you have installed
gnutls-bin as well as libgnutls-dev and libgnutls.
I've been looking all over the internet trying to find out how to remove the errors.
I have read multiple threads but no luck. I know I need the libmysqlclient-dev package but I can't for the life of me get it installed.
I run
sudo apt-get install libmysqlclient-dev
Also tried cleaning, "-f" and so on but I still get the error.
The following packages have unmet dependencies:
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.40-0ubuntu1) but 5.5.41-0ubuntu0.14.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
I tried it with aptitude
sudo aptitude install libmysqlclient-dev
then I downgraded libmysqlclient18 one version and now it works as it should.
you tried remove all PPA ( Personal Package Archive )?
before try:
sudo apt-get autoremove && sudo aptitude update && sudo aptitude install libmysqlclient-dev
I see in Bugtrack MYSQL:
https://goo.gl/34NUgo
your ERROR is Bug know Bug #73522 Installation of libmysqlclient-dev fails if libmysqlclient18 is from percona
still unsolved:
status: Unsupported
environment: Ubuntu 14.04 LTS; Kernel 3.13, MySql 5.6
att
Have you tried tu upgrade your libmysqlclient18 packet ? (Perform an apt-get update before, just in case ...)