Unable to install MySQL in Ubuntu 18.04.4 LTS - mysql

I'm trying to install the MySQL server by using the Ubuntu operating system package manager with following commands:
sudo apt-get update
sudo apt-get install mysql-server
and getting error as :
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql-server
I tried this "Ubuntu "E: Unable to locate package mysql"" but it was not helpful.

try running the command before installingsudo apt-get update && sudo apt-get dist-upgrade

Related

MySQL has problems with dependencies and not installing

i fully deleted mysql* from my Ubuntu focal. Then i reinstalled all with this commands:
sudo -i
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.11-1_all.deb
dpkg -i mysql-apt-config_0.8.11-1_all.deb
apt update
apt-get -f install -o Dpkg::Options::="--force-overwrite"
apt update
apt-get install mysql-server
And then i get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
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-server : Depends: mysql-server-8.0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
This question from stackoverflow DOES NOT WORK FOR ME unable to install mysql on ubuntu 16.04

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

libpython3.6-dev, libpython3.6 and mysqlclient not installing on ubuntu 18.04

I tried installing mysql client using pip install mysqlclient but ended up as
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
So I tried installing packages that could detect header file Python.h
For that I tried sudo apt-get install python3.6-dev
But that resulted into
The following packages have unmet dependencies:
python3.6-dev : Depends: python3.6 (= 3.6.6-1~18.04) but 3.6.6-1+xenial1 is to be installed
Depends: libpython3.6-dev (= 3.6.6-1~18.04) but it is not going to be installed
Depends: libpython3.6 (= 3.6.6-1~18.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How to deal with this situation and where the problem lies?
It seems you are having dependency issue. Install libpython3.6-dev then python3.6-dev and mysql. After that I hope you will be able to install mysqlclient.
sudo apt install libpython3.6-dev
sudo apt install python3.6-dev
sudo apt instal mysql-server
Then you will be able to install mysqlclient.
**if this does not happen it's good to uninstall and reinstall the python3.6 because many people got solution in this way. You can can see here
You may use following commands to do that and repeat those above commands.
sudo apt purge libpython3*
sudo apt-get purge python3.6
sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install python3.6*
Hope it will sove your problem.

Error installing mySQL in ubuntu - unable to locate package mysqld-server

I'm trying to install mysql server in ubuntu VM. I tried following commands:
sudo apt-get update && sudo apt-get upgrade
It gives an error saying that some files failed to download.
apt-cache search mysql
gives no result on mysql-server/mysqld-server
apt-get install mysqld-server
just gives the output in the title: unable to locate package mysqld-server
Could anyone give me a heads up? Thanks.
try this command
sudo apt-get install mysql-server-5.6

Downgrade Mysql 5.5.9 to 5.1 on Ubuntu 14.04

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