Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2796

Unable to start mariadb service on WSL2 (Win10) Ubuntu 22.04

$
0
0

I'm trying to run the mariadb service on Ubuntu 22.04 on WSL2 but with no success. The MariaDB service could not be started.

Environment:

  • Microsoft Windows [Version 10.0.19044.1645]
  • WSL2 with Ubuntu-22.04
  • Kernel version: 5.10.102.1

Steps to reproduce:

  1. Install Ubuntu 22.04 from Microsoft Store

  2. Run Ubuntu 22.04 from Menu Start

  3. Execute sudo apt update

  4. Execute sudo apt upgrade

  5. Execute exit

  6. Run wsl --shutdown from Powershell to restart WSL

  7. Run Ubuntu 22.04 from Menu Start again

  8. Execute sudo apt install mariadb-server mariadb-client

  9. Execute sudo service mariadb start

    And here comes the problem:

    * Starting MariaDB database server mariadbd       [fail]

The output from sudo mysqld --verbose --user root looks like this:

2022-05-11 18:38:35 0 [Note] mysqld (server 10.6.7-MariaDB-2ubuntu1) starting as process 458 ...2022-05-11 18:38:35 0 [Note] InnoDB: The first data file './ibdata1' did not exist. A new tablespace will be created!2022-05-11 18:38:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.112022-05-11 18:38:35 0 [Note] InnoDB: Number of pools: 12022-05-11 18:38:35 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions2022-05-11 18:38:35 0 [Note] InnoDB: Using liburing2022-05-11 18:38:35 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 1342177282022-05-11 18:38:35 0 [Note] InnoDB: Completed initialization of buffer pool2022-05-11 18:38:35 0 [Note] InnoDB: Setting file './ibdata1' size to 12 MB. Physically writing the file full; Please wait ...2022-05-11 18:38:35 0 [Note] InnoDB: File './ibdata1' size is now 12 MB.2022-05-11 18:38:35 0 [Note] InnoDB: Setting log file ./ib_logfile101 size to 100663296 bytes2022-05-11 18:38:35 0 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile02022-05-11 18:38:35 0 [Note] InnoDB: New log file created, LSN=103292022-05-11 18:38:35 0 [Note] InnoDB: Doublewrite buffer not found: creating new2022-05-11 18:38:35 0 [Note] InnoDB: Doublewrite buffer created2022-05-11 18:38:35 0 [Note] InnoDB: 128 rollback segments are active.2022-05-11 18:38:35 0 [Note] InnoDB: Creating shared tablespace for temporary tables2022-05-11 18:38:35 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...2022-05-11 18:38:35 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.2022-05-11 18:38:35 0 [Note] InnoDB: 10.6.7 started; log sequence number 0; transaction id 32022-05-11 18:38:35 0 [Note] Plugin 'FEEDBACK' is disabled.2022-05-11 18:38:35 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded2022-05-11 18:38:35 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.2022-05-11 18:38:35 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist2022-05-11 18:38:35 0 [Note] Server socket created on IP: '127.0.0.1'.2022-05-11 18:38:35 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist2022-05-11 18:38:35 0 [ERROR] AbortingWarning: Memory not freed: 280

The output from sudo mysqld --verbose --user wzgf looks like this:

2022-05-11 18:41:41 0 [Note] mysqld (server 10.6.7-MariaDB-2ubuntu1) starting as process 496 ...2022-05-11 18:41:41 0 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")2022-05-11 18:41:41 0 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'2022-05-11 18:41:41 0 [ERROR] Plugin 'Aria' init function returned error.2022-05-11 18:41:41 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.2022-05-11 18:41:41 0 [ERROR] InnoDB: The data file './ibdata1' must be writable2022-05-11 18:41:41 0 [ERROR] InnoDB: The data file './ibdata1' must be writable2022-05-11 18:41:41 0 [ERROR] Plugin 'InnoDB' init function returned error.2022-05-11 18:41:41 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.2022-05-11 18:41:41 0 [Note] Plugin 'FEEDBACK' is disabled.2022-05-11 18:41:41 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded2022-05-11 18:41:41 0 [ERROR] Failed to initialize plugins.2022-05-11 18:41:41 0 [ERROR] Aborting

Additional remarks:

  • Other services like Apache2 work fine
  • On the same machine on WSL2 with previous Ubuntu (20.04) everything works fine

Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>