title: start mariadb server problem on external HD
body: <p>I'm trying to start a local mariadb server on my raspberry pi. I've changed the datadir to point to an external harddrive, and i've gotten that working previously (with other pi's).</p>
  
  <p>however, now when i use this particular pi and type in </p>
  
  <pre><code>sudo service mariadb start
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>Job for mariadb.service failed because the control process exited with error code.
  See "systemctl status mariadb.service" and "journalctl -xe" for details.
  </code></pre>
  
  <p>When i check journalctl -xe i get</p>
  
  <pre><code>-- The unit mariadb.service has entered the 'failed' state with result 'exit-cod
  Oct 07 09:08:25 BLUE systemd[1]: Failed to start MariaDB 10.3.15 database server
  -- Subject: A start job for unit mariadb.service has failed
  </code></pre>
  
  <p>Pokiing around further I find that my ib_buffer_pool in the directory I've specified for this server seems maybe corrupted?</p>
  
  <p>Typing in ls-l for this particlar datadir I get</p>
  
  <pre><code>ls: cannot access 'ib_buffer_pool': Bad message
  total 110628
  -rwxrwxrwx 1 pi pi    16384 Oct  7 08:34 aria_log.00000001
  -rwxrwxrwx 1 pi pi       52 Oct  7 08:34 aria_log_control
  -rwxrwxrwx 1 pi pi        0 Jul  1 06:34 debian-10.3.flag
  -????????? ? ?  ?         ?            ? ib_buffer_pool
  -rwxrwxrwx 1 pi pi 12582912 Jul  9 13:38 ibdata1
  -rwxrwxrwx 1 pi pi 50331648 Jul  9 13:38 ib_logfile0
  -rwxrwxrwx 1 pi pi 50331648 Jul  1 06:34 ib_logfile1
  -rwxrwxrwx 1 pi pi        0 Jul  1 06:34 multi-master.info
  drwxrwxrwx 2 pi pi     4096 Jul  2 10:13 mysql
  -rwxrwxrwx 1 pi pi       16 Jul  1 06:34 mysql_upgrade_info
  drwxrwxrwx 2 pi pi     4096 Jul  2 10:13 performance_schema
  drwxrwxrwx 2 pi pi     4096 Jul  2 12:49 test_db
  </code></pre>
  
  <p>THose question marks freak me out...tried deleting the ib_buffer_pool and just get this "Bad Message" thing over and over.</p>
  
  <p>To get this setup working on my other pi's I had to change permissions with sudo chmod -R a+rwX directory/ and i did that for THIS pi also, thought maybe this was a permissions issue but I checked and the containing folders are all rwxrwxrwx also...</p>
  
  <p>does anyone know what might be going on and how to resolve this so I can start a local mariadb server on this pi?</p>
  
  <p>N.B. I do have a mariadb server successfully running on ANOTHER pi which THIS f-ed up pi is connected to via ethernet and I can connect to that OTHER pi's mariadb server with THIS f-ed up pi to manipulate data and so on, no problems. BUT I wanted to run a local mariadb server on THIS f-ed up pi ALSO (so it could manage a database which would be located on ITS respective harddrive)...is this kind of goal not possible and/or the cause of why my ib_buffer_pool has ??? ???? ???? and I'm getting exit-code when i try to start this local mariadb server? FYI</p>
  
  <p>Much appreciated</p>