0

I moved my MariaDB database to /media/user/extdrive1/mysql, updated the conf files, and changed chown for the drive to 7777 for user mysql.mysql. Despite all this, sudo systemctl start mysqld fails, and if I check the syslog, it returns a errcode 13: Permission Denied to /media/user/extdrive1/mysql.

Unsure what else to try; apparmor mysql file is empty.

EDIT (permissions):

/media/user/extdrive1/mysql:
total 110628
drwsrwsrwx 4 mysql mysql     4096 May  2 20:51 .
drwsrwsrwt 4 mysql mysql     4096 May  2 00:15 ..
-rwxrwxrwx 1 mysql mysql    16384 May  2 00:40 aria_log.00000001
-rwxrwxrwx 1 mysql mysql       52 May  2 00:40 aria_log_control
-rwxrwxrwx 1 mysql mysql        0 May  2 00:40 debian-10.1.flag
-rwxrwxrwx 1 mysql mysql 12582912 May  2 20:51 ibdata1
-rwxrwxrwx 1 mysql mysql 50331648 May  2 20:51 ib_logfile0
-rwxrwxrwx 1 mysql mysql 50331648 May  2 00:40 ib_logfile1
-rwxrwxrwx 1 mysql mysql        0 May  2 00:40 multi-master.info
drwsrwsrwx 2 mysql mysql     4096 May  2 00:40 mysql
srwxrwxrwx 1 mysql mysql        0 May  2 00:40 mysql.sock
drwsrwsrwx 2 mysql mysql     4096 May  2 00:40 performance_schema

/media/user/extdrive1/mysql/mysql:
total 1096
drwsrwsrwx 2 mysql mysql   4096 May  2 00:40 .
drwsrwsrwx 4 mysql mysql   4096 May  2 20:51 ..
-rwxrwxrwx 1 mysql mysql   2110 May  2 00:40 columns_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 columns_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 columns_priv.MYI
-rwxrwxrwx 1 mysql mysql   2602 May  2 00:40 column_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 column_stats.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 column_stats.MYI
-rwxrwxrwx 1 mysql mysql   2677 May  2 00:40 db.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 db.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 db.MYI
-rwxrwxrwx 1 mysql mysql   3683 May  2 00:40 event.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 event.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 event.MYI
-rwxrwxrwx 1 mysql mysql   1582 May  2 00:40 func.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 func.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 func.MYI
-rwxrwxrwx 1 mysql mysql     35 May  2 00:40 general_log.CSM
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 general_log.CSV
-rwxrwxrwx 1 mysql mysql    804 May  2 00:40 general_log.frm
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 gtid_slave_pos.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 gtid_slave_pos.ibd
-rwxrwxrwx 1 mysql mysql   1706 May  2 00:40 help_category.frm
-rwxrwxrwx 1 mysql mysql   1092 May  2 00:40 help_category.MYD
-rwxrwxrwx 1 mysql mysql   3072 May  2 00:40 help_category.MYI
-rwxrwxrwx 1 mysql mysql   1638 May  2 00:40 help_keyword.frm
-rwxrwxrwx 1 mysql mysql  91408 May  2 00:40 help_keyword.MYD
-rwxrwxrwx 1 mysql mysql  16384 May  2 00:40 help_keyword.MYI
-rwxrwxrwx 1 mysql mysql    970 May  2 00:40 help_relation.frm
-rwxrwxrwx 1 mysql mysql   9252 May  2 00:40 help_relation.MYD
-rwxrwxrwx 1 mysql mysql  19456 May  2 00:40 help_relation.MYI
-rwxrwxrwx 1 mysql mysql   1776 May  2 00:40 help_topic.frm
-rwxrwxrwx 1 mysql mysql 405476 May  2 00:40 help_topic.MYD
-rwxrwxrwx 1 mysql mysql  20480 May  2 00:40 help_topic.MYI
-rwxrwxrwx 1 mysql mysql   1897 May  2 00:40 host.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 host.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 host.MYI
-rwxrwxrwx 1 mysql mysql   1629 May  2 00:40 index_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 index_stats.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 index_stats.MYI
-rwxrwxrwx 1 mysql mysql   4998 May  2 00:40 innodb_index_stats.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 innodb_index_stats.ibd
-rwxrwxrwx 1 mysql mysql   1503 May  2 00:40 innodb_table_stats.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 innodb_table_stats.ibd
-rwxrwxrwx 1 mysql mysql   1518 May  2 00:40 plugin.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 plugin.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 plugin.MYI
-rwxrwxrwx 1 mysql mysql   3418 May  2 00:40 proc.frm
-rwxrwxrwx 1 mysql mysql   1144 May  2 00:40 proc.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 proc.MYI
-rwxrwxrwx 1 mysql mysql   2874 May  2 00:40 procs_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 procs_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 procs_priv.MYI
-rwxrwxrwx 1 mysql mysql   2839 May  2 00:40 proxies_priv.frm
-rwxrwxrwx 1 mysql mysql   1269 May  2 00:40 proxies_priv.MYD
-rwxrwxrwx 1 mysql mysql  10240 May  2 00:40 proxies_priv.MYI
-rwxrwxrwx 1 mysql mysql   1661 May  2 00:40 roles_mapping.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 roles_mapping.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 roles_mapping.MYI
-rwxrwxrwx 1 mysql mysql   2703 May  2 00:40 servers.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 servers.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 servers.MYI
-rwxrwxrwx 1 mysql mysql     35 May  2 00:40 slow_log.CSM
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 slow_log.CSV
-rwxrwxrwx 1 mysql mysql   2374 May  2 00:40 slow_log.frm
-rwxrwxrwx 1 mysql mysql   2957 May  2 00:40 tables_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 tables_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 tables_priv.MYI
-rwxrwxrwx 1 mysql mysql   1374 May  2 00:40 table_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 table_stats.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 table_stats.MYI
-rwxrwxrwx 1 mysql mysql    973 May  2 00:40 time_zone.frm
-rwxrwxrwx 1 mysql mysql    971 May  2 00:40 time_zone_leap_second.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_leap_second.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_leap_second.MYI
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone.MYI
-rwxrwxrwx 1 mysql mysql   1146 May  2 00:40 time_zone_name.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_name.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_name.MYI
-rwxrwxrwx 1 mysql mysql   1013 May  2 00:40 time_zone_transition.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_transition.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_transition.MYI
-rwxrwxrwx 1 mysql mysql   1079 May  2 00:40 time_zone_transition_type.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_transition_type.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_transition_type.MYI
-rwxrwxrwx 1 mysql mysql   3191 May  2 00:40 user.frm
-rwxrwxrwx 1 mysql mysql    176 May  2 00:40 user.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 user.MYI

/media/user/extdrive1/mysql/performance_schema:
total 12
drwsrwsrwx 2 mysql mysql 4096 May  2 00:40 .
drwsrwsrwx 4 mysql mysql 4096 May  2 20:51 ..
-rwxrwxrwx 1 mysql mysql   61 May  2 00:40 db.opt

/media/user/extdrive1/mysql/:
total 110628
drwsrwsrwx 4 mysql mysql     4096 May  2 20:51 .
drwsrwsrwt 4 mysql mysql     4096 May  2 00:15 ..
-rwxrwxrwx 1 mysql mysql    16384 May  2 00:40 aria_log.00000001
-rwxrwxrwx 1 mysql mysql       52 May  2 00:40 aria_log_control
-rwxrwxrwx 1 mysql mysql        0 May  2 00:40 debian-10.1.flag
-rwxrwxrwx 1 mysql mysql 12582912 May  2 20:51 ibdata1
-rwxrwxrwx 1 mysql mysql 50331648 May  2 20:51 ib_logfile0
-rwxrwxrwx 1 mysql mysql 50331648 May  2 00:40 ib_logfile1
-rwxrwxrwx 1 mysql mysql        0 May  2 00:40 multi-master.info
drwsrwsrwx 2 mysql mysql     4096 May  2 00:40 mysql
srwxrwxrwx 1 mysql mysql        0 May  2 00:40 mysql.sock
drwsrwsrwx 2 mysql mysql     4096 May  2 00:40 performance_schema

/media/user/extdrive1/mysql/mysql:
total 1096
drwsrwsrwx 2 mysql mysql   4096 May  2 00:40 .
drwsrwsrwx 4 mysql mysql   4096 May  2 20:51 ..
-rwxrwxrwx 1 mysql mysql   2110 May  2 00:40 columns_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 columns_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 columns_priv.MYI
-rwxrwxrwx 1 mysql mysql   2602 May  2 00:40 column_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 column_stats.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 column_stats.MYI
-rwxrwxrwx 1 mysql mysql   2677 May  2 00:40 db.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 db.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 db.MYI
-rwxrwxrwx 1 mysql mysql   3683 May  2 00:40 event.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 event.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 event.MYI
-rwxrwxrwx 1 mysql mysql   1582 May  2 00:40 func.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 func.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 func.MYI
-rwxrwxrwx 1 mysql mysql     35 May  2 00:40 general_log.CSM
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 general_log.CSV
-rwxrwxrwx 1 mysql mysql    804 May  2 00:40 general_log.frm
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 gtid_slave_pos.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 gtid_slave_pos.ibd
-rwxrwxrwx 1 mysql mysql   1706 May  2 00:40 help_category.frm
-rwxrwxrwx 1 mysql mysql   1092 May  2 00:40 help_category.MYD
-rwxrwxrwx 1 mysql mysql   3072 May  2 00:40 help_category.MYI
-rwxrwxrwx 1 mysql mysql   1638 May  2 00:40 help_keyword.frm
-rwxrwxrwx 1 mysql mysql  91408 May  2 00:40 help_keyword.MYD
-rwxrwxrwx 1 mysql mysql  16384 May  2 00:40 help_keyword.MYI
-rwxrwxrwx 1 mysql mysql    970 May  2 00:40 help_relation.frm
-rwxrwxrwx 1 mysql mysql   9252 May  2 00:40 help_relation.MYD
-rwxrwxrwx 1 mysql mysql  19456 May  2 00:40 help_relation.MYI
-rwxrwxrwx 1 mysql mysql   1776 May  2 00:40 help_topic.frm
-rwxrwxrwx 1 mysql mysql 405476 May  2 00:40 help_topic.MYD
-rwxrwxrwx 1 mysql mysql  20480 May  2 00:40 help_topic.MYI
-rwxrwxrwx 1 mysql mysql   1897 May  2 00:40 host.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 host.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 host.MYI
-rwxrwxrwx 1 mysql mysql   1629 May  2 00:40 index_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 index_stats.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 index_stats.MYI
-rwxrwxrwx 1 mysql mysql   4998 May  2 00:40 innodb_index_stats.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 innodb_index_stats.ibd
-rwxrwxrwx 1 mysql mysql   1503 May  2 00:40 innodb_table_stats.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 innodb_table_stats.ibd
-rwxrwxrwx 1 mysql mysql   1518 May  2 00:40 plugin.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 plugin.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 plugin.MYI
-rwxrwxrwx 1 mysql mysql   3418 May  2 00:40 proc.frm
-rwxrwxrwx 1 mysql mysql   1144 May  2 00:40 proc.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 proc.MYI
-rwxrwxrwx 1 mysql mysql   2874 May  2 00:40 procs_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 procs_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 procs_priv.MYI
-rwxrwxrwx 1 mysql mysql   2839 May  2 00:40 proxies_priv.frm
-rwxrwxrwx 1 mysql mysql   1269 May  2 00:40 proxies_priv.MYD
-rwxrwxrwx 1 mysql mysql  10240 May  2 00:40 proxies_priv.MYI
-rwxrwxrwx 1 mysql mysql   1661 May  2 00:40 roles_mapping.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 roles_mapping.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 roles_mapping.MYI
-rwxrwxrwx 1 mysql mysql   2703 May  2 00:40 servers.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 servers.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 servers.MYI
-rwxrwxrwx 1 mysql mysql     35 May  2 00:40 slow_log.CSM
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 slow_log.CSV
-rwxrwxrwx 1 mysql mysql   2374 May  2 00:40 slow_log.frm
-rwxrwxrwx 1 mysql mysql   2957 May  2 00:40 tables_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 tables_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 tables_priv.MYI
-rwxrwxrwx 1 mysql mysql   1374 May  2 00:40 table_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 table_stats.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 table_stats.MYI
-rwxrwxrwx 1 mysql mysql    973 May  2 00:40 time_zone.frm
-rwxrwxrwx 1 mysql mysql    971 May  2 00:40 time_zone_leap_second.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_leap_second.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_leap_second.MYI
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone.MYI
-rwxrwxrwx 1 mysql mysql   1146 May  2 00:40 time_zone_name.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_name.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_name.MYI
-rwxrwxrwx 1 mysql mysql   1013 May  2 00:40 time_zone_transition.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_transition.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_transition.MYI
-rwxrwxrwx 1 mysql mysql   1079 May  2 00:40 time_zone_transition_type.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_transition_type.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_transition_type.MYI
-rwxrwxrwx 1 mysql mysql   3191 May  2 00:40 user.frm
-rwxrwxrwx 1 mysql mysql    176 May  2 00:40 user.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 user.MYI

/media/user/extdrive1/mysql/performance_schema:
total 12
drwsrwsrwx 2 mysql mysql 4096 May  2 00:40 .
drwsrwsrwx 4 mysql mysql 4096 May  2 20:51 ..
-rwxrwxrwx 1 mysql mysql   61 May  2 00:40 db.opt

mysql:
total 110628
drwsrwsrwx 4 mysql mysql     4096 May  2 20:51 .
drwsrwsrwt 4 mysql mysql     4096 May  2 00:15 ..
-rwxrwxrwx 1 mysql mysql    16384 May  2 00:40 aria_log.00000001
-rwxrwxrwx 1 mysql mysql       52 May  2 00:40 aria_log_control
-rwxrwxrwx 1 mysql mysql        0 May  2 00:40 debian-10.1.flag
-rwxrwxrwx 1 mysql mysql 12582912 May  2 20:51 ibdata1
-rwxrwxrwx 1 mysql mysql 50331648 May  2 20:51 ib_logfile0
-rwxrwxrwx 1 mysql mysql 50331648 May  2 00:40 ib_logfile1
-rwxrwxrwx 1 mysql mysql        0 May  2 00:40 multi-master.info
drwsrwsrwx 2 mysql mysql     4096 May  2 00:40 mysql
srwxrwxrwx 1 mysql mysql        0 May  2 00:40 mysql.sock
drwsrwsrwx 2 mysql mysql     4096 May  2 00:40 performance_schema

mysql/mysql:
total 1096
drwsrwsrwx 2 mysql mysql   4096 May  2 00:40 .
drwsrwsrwx 4 mysql mysql   4096 May  2 20:51 ..
-rwxrwxrwx 1 mysql mysql   2110 May  2 00:40 columns_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 columns_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 columns_priv.MYI
-rwxrwxrwx 1 mysql mysql   2602 May  2 00:40 column_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 column_stats.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 column_stats.MYI
-rwxrwxrwx 1 mysql mysql   2677 May  2 00:40 db.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 db.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 db.MYI
-rwxrwxrwx 1 mysql mysql   3683 May  2 00:40 event.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 event.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 event.MYI
-rwxrwxrwx 1 mysql mysql   1582 May  2 00:40 func.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 func.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 func.MYI
-rwxrwxrwx 1 mysql mysql     35 May  2 00:40 general_log.CSM
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 general_log.CSV
-rwxrwxrwx 1 mysql mysql    804 May  2 00:40 general_log.frm
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 gtid_slave_pos.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 gtid_slave_pos.ibd
-rwxrwxrwx 1 mysql mysql   1706 May  2 00:40 help_category.frm
-rwxrwxrwx 1 mysql mysql   1092 May  2 00:40 help_category.MYD
-rwxrwxrwx 1 mysql mysql   3072 May  2 00:40 help_category.MYI
-rwxrwxrwx 1 mysql mysql   1638 May  2 00:40 help_keyword.frm
-rwxrwxrwx 1 mysql mysql  91408 May  2 00:40 help_keyword.MYD
-rwxrwxrwx 1 mysql mysql  16384 May  2 00:40 help_keyword.MYI
-rwxrwxrwx 1 mysql mysql    970 May  2 00:40 help_relation.frm
-rwxrwxrwx 1 mysql mysql   9252 May  2 00:40 help_relation.MYD
-rwxrwxrwx 1 mysql mysql  19456 May  2 00:40 help_relation.MYI
-rwxrwxrwx 1 mysql mysql   1776 May  2 00:40 help_topic.frm
-rwxrwxrwx 1 mysql mysql 405476 May  2 00:40 help_topic.MYD
-rwxrwxrwx 1 mysql mysql  20480 May  2 00:40 help_topic.MYI
-rwxrwxrwx 1 mysql mysql   1897 May  2 00:40 host.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 host.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 host.MYI
-rwxrwxrwx 1 mysql mysql   1629 May  2 00:40 index_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 index_stats.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 index_stats.MYI
-rwxrwxrwx 1 mysql mysql   4998 May  2 00:40 innodb_index_stats.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 innodb_index_stats.ibd
-rwxrwxrwx 1 mysql mysql   1503 May  2 00:40 innodb_table_stats.frm
-rwxrwxrwx 1 mysql mysql  98304 May  2 00:40 innodb_table_stats.ibd
-rwxrwxrwx 1 mysql mysql   1518 May  2 00:40 plugin.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 plugin.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 plugin.MYI
-rwxrwxrwx 1 mysql mysql   3418 May  2 00:40 proc.frm
-rwxrwxrwx 1 mysql mysql   1144 May  2 00:40 proc.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 proc.MYI
-rwxrwxrwx 1 mysql mysql   2874 May  2 00:40 procs_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 procs_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 procs_priv.MYI
-rwxrwxrwx 1 mysql mysql   2839 May  2 00:40 proxies_priv.frm
-rwxrwxrwx 1 mysql mysql   1269 May  2 00:40 proxies_priv.MYD
-rwxrwxrwx 1 mysql mysql  10240 May  2 00:40 proxies_priv.MYI
-rwxrwxrwx 1 mysql mysql   1661 May  2 00:40 roles_mapping.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 roles_mapping.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 roles_mapping.MYI
-rwxrwxrwx 1 mysql mysql   2703 May  2 00:40 servers.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 servers.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 servers.MYI
-rwxrwxrwx 1 mysql mysql     35 May  2 00:40 slow_log.CSM
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 slow_log.CSV
-rwxrwxrwx 1 mysql mysql   2374 May  2 00:40 slow_log.frm
-rwxrwxrwx 1 mysql mysql   2957 May  2 00:40 tables_priv.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 tables_priv.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 tables_priv.MYI
-rwxrwxrwx 1 mysql mysql   1374 May  2 00:40 table_stats.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 table_stats.MYD
-rwxrwxrwx 1 mysql mysql   2048 May  2 00:40 table_stats.MYI
-rwxrwxrwx 1 mysql mysql    973 May  2 00:40 time_zone.frm
-rwxrwxrwx 1 mysql mysql    971 May  2 00:40 time_zone_leap_second.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_leap_second.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_leap_second.MYI
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone.MYI
-rwxrwxrwx 1 mysql mysql   1146 May  2 00:40 time_zone_name.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_name.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_name.MYI
-rwxrwxrwx 1 mysql mysql   1013 May  2 00:40 time_zone_transition.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_transition.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_transition.MYI
-rwxrwxrwx 1 mysql mysql   1079 May  2 00:40 time_zone_transition_type.frm
-rwxrwxrwx 1 mysql mysql      0 May  2 00:40 time_zone_transition_type.MYD
-rwxrwxrwx 1 mysql mysql   1024 May  2 00:40 time_zone_transition_type.MYI
-rwxrwxrwx 1 mysql mysql   3191 May  2 00:40 user.frm
-rwxrwxrwx 1 mysql mysql    176 May  2 00:40 user.MYD
-rwxrwxrwx 1 mysql mysql   4096 May  2 00:40 user.MYI

mysql/performance_schema:
total 12
drwsrwsrwx 2 mysql mysql 4096 May  2 00:40 .
drwsrwsrwx 4 mysql mysql 4096 May  2 20:51 ..
-rwxrwxrwx 1 mysql mysql   61 May  2 00:40 db.opt

And here's the MariaDB config file:

# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.

#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

[mysqld]
datadir=/media/user/extdrive1/mysql
socket=/media/user/extdrive1/mysql.sock

[client]
port=3306
socket=/media/user/extdrive1/mysql.sock

ps aux | grep mysql returns this:

user 21359 0.0 0.0 4772 568 pts/2 S+ 02:27 0:00 grep --color=auto mysql

  • Please check and paste if you still have issues starting it: ls -la path/mysql/ tail path/mysql/error.log chown -R mysql path/mysql/ – ninjabber May 4 at 5:16
  • @ninjabber see above! – symtek May 4 at 5:53
  • now please cat path/my.cnf ps aux | grep mysql – ninjabber May 4 at 6:15
  • @ninjabber Updated! – symtek May 4 at 6:30
  • 190504 03:04:16 mysqld_safe Logging to syslog. 190504 03:04:16 mysqld_safe Starting mysqld daemon with databases from /media/user/extdrive1/mysql – symtek May 4 at 7:05
0

As the @danblack, @Philᵀᴹ, and @rick-james mentioned in the comments, this was a permissions hierarchy issue. While /media/user/extdrive1 and media/user/extdrive1/mysql both had the right permissions, mysql could not get to the folders it had permission to access because of permissions restrictions on /media and /media/user.

Thanks for your help, everyone!

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.