My root@localhost user has the password, but a sudo-user can access from command line without password, is it possibile to disable this sudo command line access?
-
Since you're seemingly concerned about security, this one(vs others) has more arguments on why/why not to use the configurations superuser.com/questions/735172/…– WU-TANGOct 20, 2020 at 15:29
-
I simply don't want to share my database structure to all sudo users.– TobiaOct 20, 2020 at 16:15
1 Answer
To avoid entering with sudo and that only root can enter, only recommended for your database installed locally and not in production, you could use mysql_secure_installation with a password for root.
sudo mysql_secure_installation
With this command you go through a wizard that will ask you different questions. You must tell it to keep the root user, with a password. and so you could access through without sudo.
mysql -u root -p