1

I have tried installation of mysql and mysql community version on my ubuntu. But it is failing continuously. It seems to be environment issue, as same installation command is working on a cloud ubuntu VM. However, not able to figure out what is issue, checked some existing issues on google and this forum too. Please suggest where to check the right logs and what is possible fix.

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Here are some of the logs:

Processing triggers for libc-bin (2.27-3ubuntu1) ...
/sbin/ldconfig.real: file /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcudnn.so.7 is truncated

/sbin/ldconfig.real: file /usr/local/cuda-10.0/targets/x86_64-linux/lib/libcudnn.so.7.3.1 is truncated

Processing triggers for systemd (237-3ubuntu10.22) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up mysql-client-core-5.7 (5.7.26-0ubuntu0.18.04.1) ...
Setting up mysql-client-5.7 (5.7.26-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.26-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Specified filename /var/lib/mysql/ibdata1 does not exist.
Initialization of mysqld failed: 0
Warning: Unable to start the server.
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
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.
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Tue 2019-07-16 12:45:50 UTC; 7ms ago
  Process: 24009 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess 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 triggersfor systemd (237-3ubuntu10.22) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Similar error i am getting if I tried community installation. Also tried to download and installing deb packages, these also failed. Also tried 8 as well as 5 version of mysql.
Also had purged existing mysql installations and removed mysql files : sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*

Asked in comment for journalctl -xe log.. (no log generated!) :

Jul 15 14:26:05 ALDTGPAIAPP1 su[20535]: - /dev/pts/40 user1:user1
Jul 16 07:31:33 ALDTGPAIAPP1 su[28802]: Successful su for user1 by user1
Jul 16 07:31:33 ALDTGPAIAPP1 su[28802]: + /dev/pts/43 user1:user1
Jul 16 07:31:33 ALDTGPAIAPP1 su[28802]: pam_unix(su:session): session opened for user user1 by (uid=1535129255)
Jul 16 11:51:46 ALDTGPAIAPP1 sudo[8246]: [lsass-pam] [module:pam_lsass]pam_sm_authenticate error [login:user1][err
Jul 16 12:03:46 ALDTGPAIAPP1 su[31664]: pam_unix(su:session): session closed for user user2
(base) user1@ALDTGPAIAPP1:/data/softs$ date
Tue Jul 16 15:53:18 UTC 2019
  • See askubuntu.com/questions/1098074 and similar. Possible AppArmor profile issue. – user535733 Jul 16 at 13:45
  • Welcome to AskUbuntu. Try to suggest of the error output. Please edit your post with include the output of journalctl -xe? – abu-ahmed al-khatiri Jul 16 at 15:00
  • @user535733 : in that post the issue is of apparmer.. I dont have such software in machine (or i dont know)... just not able to figure out where are the correct error logs !!! – Sandeep B Jul 16 at 15:58
-1

remove using

sudo apt remove --purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*


and try installing

sudo apt install mysql-server mysql-client mysql-common

  • 1
    As I told in my post, I have already tried this – Sandeep B Jul 16 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.