EinSoldiatGott
Posts: 7
Joined: Sat May 27, 2017 5:24 am

MariaDB is not asking for root Password

Sun Sep 30, 2018 12:50 pm

I'm using Raspbian GNU/Linux 9 (stretch) with 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0

My problem is that when I run:

Code: Select all

[email protected]:~ $ sudo mysql -u root
It enters to MariaDB without asking for a password and I need to avoid this.
Welcome to the MariaDB monitor.
Commands end with; or \g. Your MariaDB connection id is 20
Server version: 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
I've tried with:

Code: Select all

sudo mysql_secure_installation

Code: Select all

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('thepass');
But it didn't work

I'm using the raspberry to auto-execute a python script when it boots, this phyton script requires root privileges, so I run it with "sudo", then I don't want to force the system to ask for root password for all the commands, the only thing I'd want is MariaDB to ask for root password to access the database.

Thanks

DirkS
Posts: 9047
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: MariaDB is not asking for root Password

Sun Sep 30, 2018 1:05 pm

Does https://www.raspberrypi.org/forums/view ... p?t=193426 help (see last post in that topic)

EinSoldiatGott
Posts: 7
Joined: Sat May 27, 2017 5:24 am

Re: MariaDB is not asking for root Password

Sat Oct 06, 2018 4:26 pm

DirkS wrote:
Sun Sep 30, 2018 1:05 pm
Does https://www.raspberrypi.org/forums/view ... p?t=193426 help (see last post in that topic)
Thanks, it worked!!!

Return to “Other programming languages”

Who is online

Users browsing this forum: No registered users and 1 guest