Dpkg cannot install phpMyAdmin and MySQL (Ubuntu)

I am trying to install phpMyAdmin but I keep getting errors.

When I type this in the terminal:

sudo dpkg --configure -a

      

The following message appears:

Setting up mysql-server-5.0 (5.0.45-1ubuntu3) ...
 * Stopping MySQL database server mysqld [OK]
 * Starting MySQL database server mysqld [FAIL]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.0; however:
  Package mysql-server 5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encounter while processing:
 mysql-server-5.0
 mysql-server

I am also trying to access MySQL through the console by typing: mysql

This error will appear:

ERROR (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

      

This happened when I tried to install phpMyAdmin or access mine libapache

. Does anyone know how to solve these problems?

0


source to share


2 answers


The installation error is related to the package mysql-server-5.0

. You should probably do apt-get purge mysql-server-5.0

and then try reinstalling it. Once that is installed, try installing phpmyadmin.



+2


source


You can also get away with

dpkg --configure mysql-server-5.0

      



because "mysql-server" is a meta package.

+1


source







All Articles