Basic question about bash permissions
I am running OS 10.14.6 on a 2013 MacBook Pro.
Sometimes when I am in Terminal, and issue a command that I think I should be allowed to do, the system asks for a password, so I use my Mac user password on this machine. It then responds with a access denied message.
I am the owner and sole user of this machine, so my understanding is I am also the 'System Administrator' (for lack of a better term). I know I'm not supposed to try to log in as 'root' and I wouldn't want to.
For instance (from inside of a MySQL sub-folder named mysql-connector-python-8.0.20), I have my bash prompt set to "sub-folder-name: "
I do the following and enter my account user password on this machine:
mysql-connector-python-8.0.20: mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
mysql-connector-python-8.0.20:
However, if I change the command to the following:
mysql-connector-python-8.0.20: sudo mysql -u root -p
Password:
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 38
Server version: 10.4.12-MariaDB Homebrew
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
At the first Password: prompt I enter my account user password
At the second Enter Password: prompt I enter my MySQL password.
This works of course, but it just seems a bit tedious and unnecessary given what I'm trying to do. Many times I manage to fat-finger one of the two passwords and I'm never sure which one.
Can I modify some permissions somewhere so that I don't have to go thru this?
MacBook Pro 15", macOS 10.14