1

After I installed Ubuntu 16.04 I was not able anymore to access to my Mysql server from h-ttp://localhost/phpmyadmin. I tryed to uninstall and install mysql but unsuccessfully.

I discovered that the problem was inside apache2 (running h-ttp://localhost a server error appeared on the browser) and related to php, so I followed this problem to fix the problem. And apache2 now is running correctly at http://localhost.

At this point I tried to re-install mysql but appear an error:

giuseppecanto@acerAspire5750g:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdbd-mysql-perl libmysqlclient20 linux-image-4.2.0-35-generic linux-image-extra-4.2.0-35-generic mariadb-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  mysql-server mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/10,1 MB of archives.
After this operation, 94,5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
Selecting previously unselected package mysql-server-core-5.7.
(Reading database ... 312338 files and directories currently installed.)
Preparing to unpack .../mysql-server-core-5.7_5.7.12-0ubuntu1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.12-0ubuntu1) ...
Selecting previously unselected package mysql-server-5.7.
Preparing to unpack .../mysql-server-5.7_5.7.12-0ubuntu1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.12-0ubuntu1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.12-0ubuntu1_all.deb ...
Unpacking mysql-server (5.7.12-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up mysql-server-core-5.7 (5.7.12-0ubuntu1) ...
Setting up mysql-server-5.7 (5.7.12-0ubuntu1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
insserv: warning: script 'oracle-xe' missing LSB tags and overrides
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

The error is present also on phpmyadmin installing request:

giuseppecanto@acerAspire5750g:~$ sudo apt-get install phpmyadmin 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
phpmyadmin is already the newest version (4:4.5.4.1-2ubuntu1).
The following packages were automatically installed and are no longer required:
  libdbd-mysql-perl libmysqlclient20 linux-image-4.2.0-35-generic linux-image-extra-4.2.0-35-generic mariadb-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up mysql-server-5.7 (5.7.12-0ubuntu1) ...
insserv: warning: script 'oracle-xe' missing LSB tags and overrides
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running systemctl status mysql.service appear this:

giuseppecanto@acerAspire5750g:~$ systemctl status mysql.service
mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since sab 2016-05-07 11:07:17 CEST; 7min ago
  Process: 9703 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)

mag 07 11:07:17 acerAspire5750g systemd[1]: Failed to start MySQL Community Server.
mag 07 11:07:17 acerAspire5750g systemd[1]: mysql.service: Unit entered failed state.
mag 07 11:07:17 acerAspire5750g systemd[1]: mysql.service: Failed with result 'exit-code'.
mag 07 11:07:17 acerAspire5750g systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
mag 07 11:07:17 acerAspire5750g systemd[1]: Stopped MySQL Community Server.
mag 07 11:07:17 acerAspire5750g systemd[1]: mysql.service: Start request repeated too quickly.
mag 07 11:07:17 acerAspire5750g systemd[1]: Failed to start MySQL Community Server.

My purpose is to use phpmyadmin correctly. Maybe I have to uninstall all?

  • try going to your /etc/mysql/my.cnf and see if there are any my.cnf.distrib files or a default config file ... I found on mine that there was an old entry that caused it to crash every time ... i removed it and the server started .. so in this case if this is the same issue .. it should upgrade if the server can run. – John Orion May 7 '16 at 9:39
  • On the my.cnf file I have: !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ – Giuseppe Canto May 7 '16 at 10:40
  • ok .. if you check those directories .. you may find another mysql.conf or my.cfg .. check those to see if they are basically empty – John Orion May 7 '16 at 10:47
  • In /etc/mysql the directory conf.d is not present, so I deleted the entry in the my.cnf file. Within the mysql.conf.d (which is present within etc/mysql) directory is present a configuration file names mysqld.cnf. – Giuseppe Canto May 7 '16 at 10:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.