mysql after sudo su works; mysql or sudo mysql fails
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I was visiting a mysql installation (don't know the details)
[user@host ~]$ mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
Checked, and password I was given seems correct. I noticed in the sample I'd been given, they had been running as root.
[user@host ~]$ sudo mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
[Sudoers has wheel with NOPASSWD.] Ok, that's not it. Or is it?
[user@host ~]$ sudo su
[root@host user]# mysql -u kco -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 196356
Server version: 5.1.73 Source distribution
Odd. Thought it might be a socket permission thing, but
[root@host user]# ls -l /var/lib/mysql/mysql.sock
srwxrwxrwx. 1 mysql mysql 0 Mar 19 18:39 /var/lib/mysql/mysql.sock
Hm. Got a quick downvote, so let me be more explicit in the question. The desired result would be for a regular user to be able to mysql -u kco -p . Why does it require a root shell (not sudo) to access the UI?
permissions mysql
add a comment |Â
up vote
0
down vote
favorite
I was visiting a mysql installation (don't know the details)
[user@host ~]$ mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
Checked, and password I was given seems correct. I noticed in the sample I'd been given, they had been running as root.
[user@host ~]$ sudo mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
[Sudoers has wheel with NOPASSWD.] Ok, that's not it. Or is it?
[user@host ~]$ sudo su
[root@host user]# mysql -u kco -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 196356
Server version: 5.1.73 Source distribution
Odd. Thought it might be a socket permission thing, but
[root@host user]# ls -l /var/lib/mysql/mysql.sock
srwxrwxrwx. 1 mysql mysql 0 Mar 19 18:39 /var/lib/mysql/mysql.sock
Hm. Got a quick downvote, so let me be more explicit in the question. The desired result would be for a regular user to be able to mysql -u kco -p . Why does it require a root shell (not sudo) to access the UI?
permissions mysql
sudo
is modifying the linux user,mysql -u databaseUser -p
is a user setup in mysql. Normallymysql
does not require linux root access,sudo
. Only a mysql user who may have mysql root access. Example able to create and delete databases.
â jc__
May 30 at 14:13
I understand, that's why this is puzzling. Authentication and authorization in mysql is controlled by entries in a table, and should have nothing to do with effective uid; and the sudo mysql should not be different from sudo su then mysql. Yet that is the observed behaviour...
â Woody Weaver
Jun 2 at 3:04
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I was visiting a mysql installation (don't know the details)
[user@host ~]$ mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
Checked, and password I was given seems correct. I noticed in the sample I'd been given, they had been running as root.
[user@host ~]$ sudo mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
[Sudoers has wheel with NOPASSWD.] Ok, that's not it. Or is it?
[user@host ~]$ sudo su
[root@host user]# mysql -u kco -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 196356
Server version: 5.1.73 Source distribution
Odd. Thought it might be a socket permission thing, but
[root@host user]# ls -l /var/lib/mysql/mysql.sock
srwxrwxrwx. 1 mysql mysql 0 Mar 19 18:39 /var/lib/mysql/mysql.sock
Hm. Got a quick downvote, so let me be more explicit in the question. The desired result would be for a regular user to be able to mysql -u kco -p . Why does it require a root shell (not sudo) to access the UI?
permissions mysql
I was visiting a mysql installation (don't know the details)
[user@host ~]$ mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
Checked, and password I was given seems correct. I noticed in the sample I'd been given, they had been running as root.
[user@host ~]$ sudo mysql -u kco -p
Enter password:
ERROR 1045 (28000): Access denied for user 'kco'@'localhost' (using password: YES)
[Sudoers has wheel with NOPASSWD.] Ok, that's not it. Or is it?
[user@host ~]$ sudo su
[root@host user]# mysql -u kco -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 196356
Server version: 5.1.73 Source distribution
Odd. Thought it might be a socket permission thing, but
[root@host user]# ls -l /var/lib/mysql/mysql.sock
srwxrwxrwx. 1 mysql mysql 0 Mar 19 18:39 /var/lib/mysql/mysql.sock
Hm. Got a quick downvote, so let me be more explicit in the question. The desired result would be for a regular user to be able to mysql -u kco -p . Why does it require a root shell (not sudo) to access the UI?
permissions mysql
asked May 29 at 21:08
Woody Weaver
6
6
sudo
is modifying the linux user,mysql -u databaseUser -p
is a user setup in mysql. Normallymysql
does not require linux root access,sudo
. Only a mysql user who may have mysql root access. Example able to create and delete databases.
â jc__
May 30 at 14:13
I understand, that's why this is puzzling. Authentication and authorization in mysql is controlled by entries in a table, and should have nothing to do with effective uid; and the sudo mysql should not be different from sudo su then mysql. Yet that is the observed behaviour...
â Woody Weaver
Jun 2 at 3:04
add a comment |Â
sudo
is modifying the linux user,mysql -u databaseUser -p
is a user setup in mysql. Normallymysql
does not require linux root access,sudo
. Only a mysql user who may have mysql root access. Example able to create and delete databases.
â jc__
May 30 at 14:13
I understand, that's why this is puzzling. Authentication and authorization in mysql is controlled by entries in a table, and should have nothing to do with effective uid; and the sudo mysql should not be different from sudo su then mysql. Yet that is the observed behaviour...
â Woody Weaver
Jun 2 at 3:04
sudo
is modifying the linux user, mysql -u databaseUser -p
is a user setup in mysql. Normally mysql
does not require linux root access, sudo
. Only a mysql user who may have mysql root access. Example able to create and delete databases.â jc__
May 30 at 14:13
sudo
is modifying the linux user, mysql -u databaseUser -p
is a user setup in mysql. Normally mysql
does not require linux root access, sudo
. Only a mysql user who may have mysql root access. Example able to create and delete databases.â jc__
May 30 at 14:13
I understand, that's why this is puzzling. Authentication and authorization in mysql is controlled by entries in a table, and should have nothing to do with effective uid; and the sudo mysql should not be different from sudo su then mysql. Yet that is the observed behaviour...
â Woody Weaver
Jun 2 at 3:04
I understand, that's why this is puzzling. Authentication and authorization in mysql is controlled by entries in a table, and should have nothing to do with effective uid; and the sudo mysql should not be different from sudo su then mysql. Yet that is the observed behaviour...
â Woody Weaver
Jun 2 at 3:04
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446794%2fmysql-after-sudo-su-works-mysql-or-sudo-mysql-fails%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
sudo
is modifying the linux user,mysql -u databaseUser -p
is a user setup in mysql. Normallymysql
does not require linux root access,sudo
. Only a mysql user who may have mysql root access. Example able to create and delete databases.â jc__
May 30 at 14:13
I understand, that's why this is puzzling. Authentication and authorization in mysql is controlled by entries in a table, and should have nothing to do with effective uid; and the sudo mysql should not be different from sudo su then mysql. Yet that is the observed behaviour...
â Woody Weaver
Jun 2 at 3:04