0

I just fresh installed Ubuntu 18.04 and tried to get the LAMP stack. During install, no pop-up screen for MySQL server configuration, during installation of the OS. I tried to login using root w/out password (default is no password), permission denied. Run mysql_secure_installation, set a password for root user, then I tried to login using the password I set, it still says permission denied even I typed the correct password. I tried to start the service manually, it turns out to time out. Purged mysql-server and change to mariadb-server, same thing. Is it a bug in MySQL server in 18.04? I have used MySQL in 17.10, no issues.

Excerpt of journalctl -xe:

-- Unit mariadb.service has begun starting up.
May 13 05:55:09 v1 mysqld[4863]: 2018-05-13  5:55:09 140117780589696 [Note] /usr/sbin/mysqld (mysqld 10.1.29-MariaDB-6) starting as process 4863 ...
May 13 05:55:09 v1 audit[4863]: AVC apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=48
May 13 05:55:09 v1 kernel: audit: type=1400 audit(1526190909.418:36): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld
May 13 05:56:39 v1 systemd[1]: mariadb.service: Start operation timed out. Terminating.
May 13 05:56:39 v1 audit[4863]: AVC apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=48
May 13 05:56:39 v1 kernel: audit: type=1400 audit(1526190999.051:37): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld
May 13 05:56:41 v1 audit[4863]: AVC apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=48
May 13 05:56:41 v1 kernel: audit: type=1400 audit(1526191001.179:38): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld
May 13 05:56:41 v1 audit[4863]: AVC apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=48
May 13 05:56:41 v1 kernel: audit: type=1400 audit(1526191001.179:39): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld
May 13 05:56:41 v1 systemd[1]: mariadb.service: Failed with result 'timeout'.
May 13 05:56:41 v1 systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mariadb.service has failed.

Expected output during LAMP stack installation in Ubuntu server

  • 1
  • No, it already happened in the fresh install of Ubuntu server – Ken Ken May 13 '18 at 06:16
  • it is apparmor giving you the trouble. Instead of searching for differences in your and the other posts. You should focus on apparmor and the answer given in that post, as missing entries in the apparmor profile CLEARLY is the culprit here as seen in your output.

    audit: apparmor="DENIED" name="run/systemd/notify"

    Looks like the status (start(stop/restart) of the database cannot be send to run/systemd/notify.

    Please look in /var/log/mysql for more information and add them to your question

    – s1mmel May 13 '18 at 06:28
  • see here https://askubuntu.com/questions/750604/why-does-mariadb-keep-dying-how-do-i-stop-it?rq=1 – s1mmel May 13 '18 at 06:32
  • Solution found here that worked for me (Ubuntu 18.04 / Mariadb 10.1) : https://askubuntu.com/a/1188236/1034799 – Aymeric Jeanneau Jan 16 '20 at 12:45
  • @s1mmel not necessarily. the path denied here is run/systemd/notify which looks like a relative path. I do actually have the line that allows writing on /run/systemd/notify in my apparmor configuration yet I get the same error. This could be configuration issue on MySQL side. – timuçin Dec 09 '20 at 10:21
  • Okay that may be the case. Nonetheless a directory has access rights to it, relative or not. Did you check that the mysql user is allowed to use this run folder? To try that you could temporarily give the mysql user a bash and sudo su into the account, to check out if this a bogus message, or you are really allowed to write in that path. If it ain't AppArmor, it could be just simple access rights. – s1mmel Dec 09 '20 at 14:52

0 Answers0