I'm a newbie here so please bear with me.
I'm using ubuntu 14.04.
I tried entering mysql with the following command:
mysql -u root -p
and I got the following message:
The program mysql can be found on the following packages:
* mysql-client-core-5.5
* mariadb-client-core-5.5
* mysql-client-core-5.6
* percona-xtrabd-cluster-client-5.5
I then typed in:
sudo apt-get install mysql-client-core-5.6
After this was installed, I tried connecting to mysql again using:
mysql -u root -p
I then got the error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
After searching online, I found out I needed to install mysql server and so I wrote in the following command
sudo apt-get install mysql-server
I then got the message:
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-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I've been looking on line for the past hour for a solution but other people who had a similar error but had it from upgrading mysql and thus there solution were ineffective for me.