Bug ID 1227259
Summary Upgrade of mariadb creates new system table files as owner "root" when it needs to be "mysql"
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.6
Hardware x86-64
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Installation
Assignee yast2-maintainers@suse.de
Reporter grant.eureka@xtra.co.nz
QA Contact jsrain@suse.com
Target Milestone ---
Found By ---
Blocker ---

The upgrade of MariaDB to version 11.4.2-lp156.2.1 completes a post-install
procedure to upgrade the MariaDB internal system table files to version 11.4.2
The post-install creates these files as owner "root" instead of "mysql".
To fix this, I had to chown mysql for all the files in the mariadb/mysql
mariadb/performance_schema and mariadb/sys directories.

The upgrade path followed was mysql 5.7.44 to MariaDB 11.2.3 while using Leap
15.6 (beta). Finally upgrade to MariaDB 11.4.2 using Leap 15.6 (RC).

Without changing the owner, MariaDB fails to start.  The username for the
mariadb service is mysql. Following is the error log:
2024-06-10  8:43:55 0 [Note] Starting MariaDB 11.2.3-MariaDB-log source
revision 79580f4f96fc2547711f674eb8dd514abd312b4a as process 1471
2024-06-10  8:43:55 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-06-10  8:43:55 0 [Note] InnoDB: Number of transaction pools: 1
2024-06-10  8:43:55 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-06-10  8:43:55 0 [Note] InnoDB: Using Linux native AIO
2024-06-10  8:43:55 0 [Note] InnoDB: Initializing buffer pool, total size =
10.000MiB, chunk size = 1.000MiB
2024-06-10  8:43:55 0 [Note] InnoDB: Completed initialization of buffer pool
2024-06-10  8:43:55 0 [Note] InnoDB: File system buffers for log disabled
(block size=4096 bytes)
2024-06-10  8:43:55 0 [Note] InnoDB: Resetting space id's in the doublewrite
buffer
2024-06-10  8:43:55 0 [Note] InnoDB: End of log at LSN=779791006
2024-06-10  8:43:56 0 [Note] InnoDB: Opened 3 undo tablespaces
2024-06-10  8:43:56 0 [Note] InnoDB: 128 rollback segments in 3 undo
tablespaces are active.
2024-06-10  8:43:56 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB.
Physically writing the file full; Please wait ...
2024-06-10  8:43:56 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-06-10  8:43:56 0 [Note] InnoDB: log sequence number 779791006; transaction
id 5516328
2024-06-10  8:43:56 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-06-10  8:43:56 0 [Note] Plugin 'wsrep-provider' is disabled.
2024-06-10  8:43:56 0 [Note] InnoDB: Loading buffer pool(s) from
/db/mariadb/ib_buffer_pool
2024-06-10  8:43:57 0 [Note] InnoDB: Buffer pool(s) load completed at 240610 
8:43:57
2024-06-10  8:43:57 0 [Note] Server socket created on IP: '192.168.43.40'.
2024-06-10  8:43:57 0 [Note] mysqld: Event Scheduler: Loaded 0 events
2024-06-10  8:43:57 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '11.2.3-MariaDB-log'  socket: '/var/run/mysql/mysql.sock'  port: 3306 
MariaDB package
2024-06-10 10:06:16 4 [Warning] Aborted connection 4 to db: 'unconnected' user:
'root' host: 'socrates.local' (Got an error reading communication packets)
2024-06-10 10:06:29 6 [Warning] Access denied for user 'root'@'socrates.local'
(using password: NO)
2024-06-10 10:14:49 8 [Warning] Aborted connection 8 to db: 'unconnected' user:
'root' host: 'socrates.local' (Got an error reading communication packets)
2024-06-10 12:40:45 13 [Warning] Access denied for user 'root'@'socrates.local'
(using password: NO)
2024-06-10 12:59:48 17 [Warning] Aborted connection 17 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 18:32:29 34 [Warning] Aborted connection 34 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 22:47:18 45 [Warning] Aborted connection 45 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 22:51:57 47 [Warning] Aborted connection 47 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 22:57:40 49 [Warning] Aborted connection 49 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 23:09:09 51 [Warning] Aborted connection 51 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 23:16:53 54 [Warning] Aborted connection 54 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 23:26:25 56 [Warning] Aborted connection 56 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 23:46:09 60 [Warning] Aborted connection 60 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-10 23:55:48 63 [Warning] Aborted connection 63 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-11  0:37:54 66 [Warning] Aborted connection 66 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-11  0:49:14 69 [Warning] Aborted connection 69 to db: 'unconnected'
user: 'root' host: 'socrates.local' (Got an error reading communication
packets)
2024-06-11  1:00:26 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal
shutdown
2024-06-11  1:00:26 0 [Note] InnoDB: FTS optimize thread exiting.
2024-06-11  1:00:26 0 [Note] InnoDB: Starting shutdown...
2024-06-11  1:00:26 0 [Note] InnoDB: Dumping buffer pool(s) to
/db/mariadb/ib_buffer_pool
2024-06-11  1:00:26 0 [Note] InnoDB: Restricted to 157 pages due to
innodb_buf_pool_dump_pct=25
2024-06-11  1:00:26 0 [Note] InnoDB: Buffer pool(s) dump completed at 240611 
1:00:26
2024-06-11  1:00:26 0 [Note] InnoDB: Removed temporary tablespace data file:
"./ibtmp1"
2024-06-11  1:00:26 0 [Note] InnoDB: Shutdown completed; log sequence number
780656937; transaction id 5516899
2024-06-11  1:00:26 0 [Note] /usr/sbin/mysqld: Shutdown complete

The automatic post-install process needs to create new files with the ownership
the same as the user for the MariaDB service (or owner of the parent database
directory), not root.


You are receiving this mail because: