How do I start mariadb without the option --skip-grant-tables?

17 Views Asked by At

I'm installing mariadb on a fresh install of ubuntu 24.04 from the default repo's.

After installation, I run 'mysql_secure_installation'. The first question I'm asked is the root password for mysql.

My understanding is that by default there is no root mysql password.

When I hit 'return', I get the message:

Error 1290 (HY000) at line 1: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement

How can I start mariaDB without this option?

1

There are 1 best solutions below

0
danblack On

To resolve:

Error 1290 (HY000) at line 1: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement

Find skip-grant-tables in your configuation file. If you run sudo -u mariadbd --help --verbose the files it reads is at the top of the output.

If nothing is there shutdown the mariadbd process (sudo killall mariadbd) and then start the server normally like systemctl start mariadb.service.

The default Ubuntu package install is with a secure unix_socket authentication for the root user.

If you'd like to set a password for the root user as well (and make it less secure, passwords can be used by any unix user):

sudo mariadb -e 'set password = password("my secure password")'

Running mysql_secure_installation isn't required (and needs a lot of work).