我是这里的新手,请多多包涵。
我正在使用Ubuntu 14.04。
我尝试使用以下命令输入mysql:
mysql -u root -p
我收到以下消息:
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
然后输入:
sudo apt-get install mysql-client-core-5.6
安装此程序后,我尝试使用以下方法再次连接到mysql:
mysql -u root -p
然后我得到了错误信息:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
在线搜索后,我发现我需要安装mysql服务器,因此我在以下命令中写道
sudo apt-get install mysql-server
然后我得到消息:
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.
在过去的一个小时里,我一直在寻找解决方案,但是其他人也遇到了类似的错误,但是由于升级mysql而导致了错误,因此对我来说解决方案无效。