LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2024, 03:14 PM   #1
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Rep: Reputation: Disabled
existing user cannot log in


rhel 7.9
mysql 8.0.35
I have a script user that used to be able to log in. I have no way of knowing when the login stopped working, but it was 2021, sometime.
It was just brought to my attention, so this mysql user isn't used much.

Anyways, now the log in does not work, either directly on the mysql server, or through mysql workbench.
Just a simple error:
Access denied for user 'vendoruser'@'localhost' (using password: YES)

The mysql log doesn't show anything helpful:
Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
I'm sure I'll have to do this sometime, but for now, I just want to keep the script, as-is.

I tried to delete the user from mysql, and re-add. Which appears to work fine. But the problem persists.

After deleting the user, I've flushed privileges, and flushed again after creating.

Not sure where the issue lies?

This is a virtual server, so I can blow it up to try whatever. I've got a backup and a snapshot.

It's likely something dumb, but I just haven't found what it is.

Just to add, my root user logs in fine. I have other connections to this server, that seem to be fine. So, it's just this 1 user.

thanks, all

Last edited by vinmansbrew; 03-13-2024 at 02:20 PM.
 
Old 03-09-2024, 10:43 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,466

Rep: Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353
Is there a groups issue? Should the user be in a particular group?
 
Old 03-09-2024, 11:37 AM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,753

Rep: Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224
I read this as the user can’t log into mysql.
OP: Sounds to me like the password is not set up correctly for that user in mysql. Especially since the user has been updated.
 
Old 03-09-2024, 11:55 AM   #4
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 800

Rep: Reputation: 257Reputation: 257Reputation: 257
Wayward ~/.my.cnf? I don't type my name/password, but rather rely on ~/.my.cnf. If that file gets stale, it might have an old password.
 
Old 03-12-2024, 12:10 PM   #5
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Original Poster
Rep: Reputation: Disabled
No, I don' think the user is part of any particular group. This server hosts multiple mysql databases. This user is solely for 1 db.

I have had to create users before, they worked. But this user is connecting from a different server. So I used: CREATE USER 'test'@'servername' IDENTIFIED BY 'password';
Which creates the user. But, I log out of mysql, and then try as the testuser I just made, and it fails. For whatever reason, my.cnf shows the log path for errors, but the log has nothing in it.
I have not looked at any my.cnf files. Partly why I tried to delete the old user, and make a new 1. Granted, the name was the same. So, if the my.cnf is stale, I suppose it could still be trying to read it.

I have also tried just doing a simple local user:
CREATE USER 'test'@'localhost' IDENTIFIED BY 'testpass';
Creates, but I can't log in with it.
Log still just shows the same thing.
Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

Update, I had to change the CREATE USER command.
it had to be"
CREATE USER 'vendortest'@'localhost' IDENTIFIED WITH mysql_native_password BY 'testpass';
This was for a local user. I am going to try it with the remote user.

Last edited by vinmansbrew; 03-12-2024 at 12:51 PM.
 
Old 03-12-2024, 02:50 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,753

Rep: Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224
But…given the warning you’re getting about 'mysql_native_password’, you should probably use caching_sha2_password instead.
 
Old 03-12-2024, 03:10 PM   #7
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 195

Original Poster
Rep: Reputation: Disabled
True, but I'd like to get 1 issue at a time.

So, I had to add bind-address=0.0.0.0 and then this user could connect from its remote server, to the mysql server. Not sure I like that. But at least I can proceed.

Now, I have to see if it's the database that is refusing to be updated, or if it's a script error.
Checking the database status:
Threads: 6 Questions: 578711 Slow queries: 0 Opens: 8360 Flush tables: 3 Open tables: 2658 Queries per second avg: 34.535
I am wondering if I need to flush tables? If so, can I limit to just the tables in the 1 DB? I am reading up on mysql, but sometimes it isn't always clear to a noob.
I am thinking a syntax like: FLUSH TABLES WITH READ UNLOCK;
Maybe?

Last edited by vinmansbrew; 03-13-2024 at 02:30 PM.
 
Old 03-14-2024, 07:32 PM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,753

Rep: Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224
I don’t allow remote users to access the databases I host, so I can’t help you with that issue. All access to my databases is via web-based applications running on the server.
It sounds as tho you’ve solved the original problem, tho. Are you now asking about a different problem? It might be cleaner if you started a new thread…at least explain what the new problem is
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to log internal-sftp chroot jailed users access log to /var/log/sftp.log file LittleMaster Linux - Server 0 09-04-2018 03:45 PM
Fedora 12 cannot log in as root, cannot su nor log into bash Neo-New Fedora 7 06-24-2010 12:48 PM
[SOLVED] Add existing unix user to existing LDAP antoniemail Linux - Server 7 06-23-2010 12:54 PM
add an existing user to an existing group? tramni1980 Slackware 5 05-08-2008 07:28 PM
Dual boot "merge" from existing 98 & existing Linux atsmith Linux - Newbie 4 07-13-2003 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration