LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-08-2021, 12:29 PM   #1
Mental-Octopus
Member
 
Registered: Sep 2018
Posts: 51

Rep: Reputation: Disabled
upgrade mysql-server (mariadb) can't log into root stuck in secure-auth


It kept saying Server is running in --secure-auth mode, but 'root'@'localhost' has a password in the old format; please change the password to the new format on debian

I tried adding skip-grant-tables and secure-auth=off to mysqld in my.cnf
but then it says
error: 'Access denied for user 'root'@'localhost' mysql debian

I'm using debian 10 after updating mariadb

please someone help

Last edited by Mental-Octopus; 12-09-2021 at 10:12 AM.
 
Old 12-08-2021, 01:54 PM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,179

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
This link has a few methods to get around the issue, or how to update the password hash to the new format.
https://stackoverflow.com/questions/...-auth-mode-but
 
Old 12-08-2021, 02:43 PM   #3
Mental-Octopus
Member
 
Registered: Sep 2018
Posts: 51

Original Poster
Rep: Reputation: Disabled
Ok this link they say I should update the password but it won't let me, it keeps saying access denied to root@localhost
 
Old 12-08-2021, 02:53 PM   #4
Mental-Octopus
Member
 
Registered: Sep 2018
Posts: 51

Original Poster
Rep: Reputation: Disabled
I've also tried to use

> mysqld_safe --skip-grant-tables &

to login to mysql, it let me change the password but when I tried to restart mysql it crashed with
an error :

>>Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables<<

I had to delete aria_log_control in /var/lib/mysql to restart mariadb
and then I tried to log in again and same error comes up.
 
Old 12-08-2021, 04:44 PM   #5
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,179

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Looks like you have to do the answer below that one first, and change the my.cnf to say
Code:
old_passwords=1
Then you should be able to start it and then reset the password.
 
Old 12-09-2021, 10:11 AM   #6
Mental-Octopus
Member
 
Registered: Sep 2018
Posts: 51

Original Poster
Rep: Reputation: Disabled
I've fixed it now. Problem was I had to go into mysqld_safe with skip-grant-tables by
putting in this command:

mysqld_safe --skip-grant-tables &

then open mysql

sudo mysql -u root

So before when I did this and tried to change the password for root so that it could be able to log in again I didn't use the right command to change it
I noticed this when I selected rows from mysql.user and saw in the authentication_string column it said old_password for root.
After I changed the password for root using
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_password');
I followed exact instructions from this article linked below to a T:

https://www.digitalocean.com/communi...-root-password

For anyone who comes into this problem when updating mariadb on debian 10 remember to follow every instruction carefully and make sure you use the right commands
for your mysql version. In the future it may change.

Also the >>Aria engine is not enabled or did not start << error was caused by not terminating and killing processes running mysql safe mode after updating the root password and attempting to restart Mysql. You have to make sure to kill all processes running mysql first.
 
Old 12-09-2021, 10:12 AM   #7
Mental-Octopus
Member
 
Registered: Sep 2018
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by uteck View Post
Looks like you have to do the answer below that one first, and change the my.cnf to say
Code:
old_passwords=1
Then you should be able to start it and then reset the password.
Thanks anyway.
 
  


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
LXer: KDE Participating in Google Summer of Code 2019, MariaDB Releasing New Open-Source MariaDB Enterprise Server, CentOS Celebrates 15th B LXer Syndicated Linux News 0 02-28-2019 06:50 AM
[SOLVED] after installation of MySQL could not log into mysql using temporary password in /var/log/mysqld.log User247 Linux - Server 2 12-25-2017 09:31 AM
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 02:21 PM
the significance and name of the 5th column of /var/log/auth.log (ubuntu server)? CoffeeKing!!! Linux - Security 4 02-05-2009 07:32 AM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:12 PM.

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