Loading...
X

Errors “Incorrect definition of table mysql.event: expected column ‘definer’ at position 3 to have type varchar(, found type char(141)” and “Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler” (SOLVED)

When upgrading mariadb to version 10.8.3, the following messages were shown:

warning: directory permissions differ on /usr/lib/mysql/plugin/auth_pam_tool_dir/
filesystem: 700  package: 755
:: MariaDB was updated to a new feature release. To update the data run:
   systemctl restart mariadb.service && mariadb-upgrade -u root -p

They contain information about two events that require the action of a system administrator or user.

The second one is more important, it says that to update the data, you need to run the specified commands.

An error occurred when initializing system tables. Disabling the Event Scheduler (SOLVED)

First, restart the DBMS service and check its status:

sudo systemctl restart mariadb.service
systemctl status mariadb.service

Sample output:

● mariadb.service - MariaDB 10.8.3 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-06-01 03:40:27 MSK; 34s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 1271213 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 1271214 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
    Process: 1271261 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
   Main PID: 1271247 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 14 (limit: 4690)
     Memory: 187.7M
        CPU: 788ms
     CGroup: /system.slice/mariadb.service
             └─1271247 /usr/bin/mariadbd

Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] InnoDB: log sequence number 38052502275; transaction id 74463190
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] Server socket created on IP: '127.0.0.1'.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [ERROR] mariadbd: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: 2022-06-01  3:40:26 0 [Note] /usr/bin/mariadbd: ready for connections.
Jun 01 03:40:26 suip.biz mariadbd[1271247]: Version: '10.8.3-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Arch Linux
Jun 01 03:40:27 suip.biz systemd[1]: Started MariaDB 10.8.3 database server.
Jun 01 03:40:27 suip.biz mariadbd[1271247]: 2022-06-01  3:40:27 0 [Note] InnoDB: Buffer pool(s) load completed at 220601  3:40:27

On the one hand, the service is up and running. However, there are a few error messages as well as a few warnings. Most important messages:

[ERROR] Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141).
[ERROR] mariadbd: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.

Action must be taken to fix errors.

To do this, run a database update:

sudo mariadb-upgrade -u root -p

You will need to enter the password of the DBMS root user and wait for the command to complete.

Then restart the service again and check its status:

sudo systemctl restart mariadb.service
systemctl status mariadb.service

As you can see, there are no errors.

directory permissions differ on /usr/lib/mysql/plugin/auth_pam_tool_dir/ filesystem: 700 package: 755 (SOLVED)

Now let's look at the second message:

warning: directory permissions differ on /usr/lib/mysql/plugin/auth_pam_tool_dir/
filesystem: 700 package: 755

This is not an error, but a warning. The bottom line is that the permission on the /usr/lib/mysql/plugin/auth_pam_tool_dir/ directory differs between the actual value in the file system and the one specified in the installation package.

The most likely reasons for this are:

  • in the previous version of the package, different permissions were specified for the directory, and then the package maintainers decided to change them for one reason or another
  • you yourself changed the permissions to the specified directory

To bring the value of permissions to those recommended in the installation package, start by checking the current value:

sudo ls -dl /usr/lib/mysql/plugin/auth_pam_tool_dir/

Then run the chmod command with the desired permissions:

sudo chmod 755 /usr/lib/mysql/plugin/auth_pam_tool_dir/

Check your permissions again:

sudo ls -dl /usr/lib/mysql/plugin/auth_pam_tool_dir/

As you can see in the following screenshot, the permissions to the specified directory have been changed:


Leave Your Observation

Your email address will not be published. Required fields are marked *