MariaDB does not start on Manjaro

xfce
applications
manjaro
installation
data
#1

I have been trying to set up a local server and I have been having problems starting mariadb. I have followed some tutorials and, as a result, seem to have created an error. When I try to start the mariadb service (service mariadb start), I get this:

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

When I execute ‘systemctl status mariadb.service’, I got this:

● mariadb.service - MariaDB 10.1.37 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor pr>
   Active: failed (Result: exit-code) since Wed 2019-01-16 13:52:32 -02; 1min 5>
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 5472 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WS>
  Process: 5420 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VA>
  Process: 5419 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_STAR>
 Main PID: 5472 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140544760084224 [>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [>
jan 16 13:52:32 wanghley-pc systemd[1]: mariadb.service: Main process exited, c>
jan 16 13:52:32 wanghley-pc systemd[1]: mariadb.service: Failed with result 'ex>
jan 16 13:52:32 wanghley-pc systemd[1]: Failed to start MariaDB 10.1.37 databas>
lines 1-21/21 (END)...skipping...
● mariadb.service - MariaDB 10.1.37 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-01-16 13:52:32 -02; 1min 54s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 5472 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 5420 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]  >
  Process: 5419 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 5472 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB:  Percona XtraDB (http://www.percona.com)>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] Plugin 'FEEDBACK' is disabled.
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140544760084224 [Note] InnoDB: Dumping buffer pool(s) not yet started
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [Note] Server socket created on IP: '::'.
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [ERROR] Can't start server: Bind on TCP/IP port. Got er>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [ERROR] Do you already have another mysqld server runni>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [ERROR] Aborting
jan 16 13:52:32 wanghley-pc systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
jan 16 13:52:32 wanghley-pc systemd[1]: mariadb.service: Failed with result 'exit-code'.
jan 16 13:52:32 wanghley-pc systemd[1]: Failed to start MariaDB 10.1.37 database server.

When I execute journalctl -xe, I got this:

jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] /usr/bin/mysqld (mysqld 10.1.37-MariaDB) startin>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: innodb_empty_free_list_algorithm has bee>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Using mutexes to ref count buffer pool p>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: The InnoDB memory heap is disabled
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Mutexes and rw_locks use GCC atomic buil>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: GCC builtin __atomic_thread_fence() is u>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Compressed tables use zlib 1.2.11
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Using Linux native AIO
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Using generic crc32 instructions
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Initializing buffer pool, size = 128.0M
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Completed initialization of buffer pool
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Highest supported file format is Barracu>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: 128 rollback segment(s) are active.
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB: Waiting for purge to start
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] InnoDB:  Percona XtraDB (http://www.percona.com)>
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140545341280192 [Note] Plugin 'FEEDBACK' is disabled.
jan 16 13:52:29 wanghley-pc mysqld[5472]: 2019-01-16 13:52:29 140544760084224 [Note] InnoDB: Dumping buffer pool(s) not yet started
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [Note] Server socket created on IP: '::'.
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [ERROR] Can't start server: Bind on TCP/IP port. Got er>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [ERROR] Do you already have another mysqld server runni>
jan 16 13:52:30 wanghley-pc mysqld[5472]: 2019-01-16 13:52:30 140545341280192 [ERROR] Aborting
jan 16 13:52:32 wanghley-pc systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
jan 16 13:52:32 wanghley-pc systemd[1]: mariadb.service: Failed with result 'exit-code'.
jan 16 13:52:32 wanghley-pc systemd[1]: Failed to start MariaDB 10.1.37 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mariadb.service has failed.
-- 
-- The result is RESULT.
jan 16 13:52:32 wanghley-pc audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=mariadb comm="systemd" exe=">
jan 16 13:52:32 wanghley-pc kernel: audit: type=1130 audit(1547653952.659:99): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=m>
jan 16 13:52:32 wanghley-pc polkitd[499]: Unregistered Authentication Agent for unix-process:5409:636285 (system bus name :1.2774, ob>

How can I solve it?
Since now thanks for your help.

#2

https://wiki.archlinux.org/index.php/MariaDB

#3

@linux-aarhus I tried to install with the tutorial, but the error persists.
What else can I do? I’ve searched for solutions, but I wasn’t able to fix it.

Since now, Thanks for your help.

#4

If you are completely stuck

  • stop the service - systemctl stop mariadb
  • disable the service - systemctl disable mariadb
  • uninstall the package using pacman -Rns mariadb
  • remove the folder /var/lib/mysql sudo rm -rf /var/lib/mysql

Reboot your system and start over - other than the above removal - don’t ever touch the folder /var/lib/mysql as mysql is depending on specific permissions.

Be sure to follow the wiki - and it will work.

If you have mysql installed as well - remove it as mariadb and mysql cannot be installed at the same time.

Also read the messages - it states that the service port is in use and therefore the mariadb service cannot start.

When the port is use it indicates you are trying to run more than one instance which is not possible unless you bind it to another port than the default.

3 Likes
closed #5

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.