简体   繁体   中英

dpkg cannot install phpMyAdmin and MySQL (Ubuntu)

I'm attempting to install phpMyAdmin, but I constantly get 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 also attempt to access MySQL through the console by typing: mysql

This error appears:

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

This occurred ever I tried to install phpMyAdmin or accessing my libapache . Does anyone know how to resolve these problems?

The installer error is related to the mysql-server-5.0 package. You probably should do an apt-get purge mysql-server-5.0 and then try reinstalling it. Once that has been installed, try and install phpmyadmin.

You might also be able to get away with

dpkg --configure mysql-server-5.0

since 'mysql-server' is a meta package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM