LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysql-server root connects, no other account does (https://www.linuxquestions.org/questions/linux-server-73/mysql-server-root-connects-no-other-account-does-892161/)

mpapet 07-17-2011 07:54 AM

mysql-server root connects, no other account does
 
Hi,

I'm running Debian Testing and am confounded by a new problem.

mysql -u root -p works great.

mysql -u mythtv -p doesn't. This is a first for me.

I did the usual as mysql root:
mysql> create user 'mythtv'@'127.0.0.1' identified by 'mythtv';
Query OK, 0 rows affected (0.01 sec)

mysql> grant all on *.* to 'mythtv'@'127.0.0.1';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)


Here's the user in the mysql user table:
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |

| 127.0.0.1 | mythtv | *CC8F35F587CA5A556B4132C2407E556D92172FFC | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 |

I did the same old login,
mysql -u mythtv -p
Enter password:
ERROR 1045 (28000): Access denied for user 'mythtv'@'localhost' (using password: YES

What logging options do I use to figure out why it's being denied?

Thanks

tronayne 07-17-2011 10:23 AM

Perhaps try (this makes mythv and administrative user)
Code:

grant  all privileges on *.*
to      'mythtv'@'localhost' identified by 'mythtv' with grant option;

grant  all privileges on *.*
to      'mythtv'@'%' identified by 'mythtv' with grant option;

flush  privileges;

The "grant all privileges" above creates the user.

It looks like you want "Atila the Hun" permissions for user mythtv; otherwise delete the with grant option part from the above.

Hope this helps some.

mpapet 07-18-2011 09:19 AM

Quote:

Originally Posted by tronayne (Post 4417335)
Perhaps try (this makes mythv and administrative user)
Code:

grant  all privileges on *.*
to      'mythtv'@'localhost' identified by 'mythtv' with grant option;

grant  all privileges on *.*
to      'mythtv'@'%' identified by 'mythtv' with grant option;

flush  privileges;

The "grant all privileges" above creates the user.

It looks like you want "Atila the Hun" permissions for user mythtv; otherwise delete the with grant option part from the above.

Hope this helps some.

Yeah, I figured I'd start with the loosest possible permissions and backtrack when I got the client issues sorted out.

The final answer was to reset the password per the example below. Why? Dunno.

UPDATE mysql.user SET Password=PASSWORD('newpass')
WHERE User='bob' AND Host='%.loc.gov';
FLUSH PRIVILEGES;


All times are GMT -5. The time now is 04:07 AM.