lubuntu - mariadb ignores correct password
up vote
1
down vote
favorite
This is a problem I got today when upgrading my Lubuntu version to 18.04. After the update, the system deleted my MariaDB packages. When I tried to installing them again the installer said the will move the current installation to another folder (so I'm not worried about data lost yet, but I need a way to import the data after I solve this.).
However, after I installed the new MariaDB package, it didn't prompt me to assign a root password (I assumed it would be the same as the previous installation) however I was wrong.
I searched the web about how to reset the root password, but after starting the service in --skip-grant-tables
mode and then assigning a new password to my MariaDB database, I still couldn't log in after a reboot. (I needed to reboot since starting the service manually didn't work).
~$ mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
I appreciate any help with this issue since it's hindering my work.
lubuntu password 18.04 mariadb
add a comment |Â
up vote
1
down vote
favorite
This is a problem I got today when upgrading my Lubuntu version to 18.04. After the update, the system deleted my MariaDB packages. When I tried to installing them again the installer said the will move the current installation to another folder (so I'm not worried about data lost yet, but I need a way to import the data after I solve this.).
However, after I installed the new MariaDB package, it didn't prompt me to assign a root password (I assumed it would be the same as the previous installation) however I was wrong.
I searched the web about how to reset the root password, but after starting the service in --skip-grant-tables
mode and then assigning a new password to my MariaDB database, I still couldn't log in after a reboot. (I needed to reboot since starting the service manually didn't work).
~$ mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
I appreciate any help with this issue since it's hindering my work.
lubuntu password 18.04 mariadb
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
This is a problem I got today when upgrading my Lubuntu version to 18.04. After the update, the system deleted my MariaDB packages. When I tried to installing them again the installer said the will move the current installation to another folder (so I'm not worried about data lost yet, but I need a way to import the data after I solve this.).
However, after I installed the new MariaDB package, it didn't prompt me to assign a root password (I assumed it would be the same as the previous installation) however I was wrong.
I searched the web about how to reset the root password, but after starting the service in --skip-grant-tables
mode and then assigning a new password to my MariaDB database, I still couldn't log in after a reboot. (I needed to reboot since starting the service manually didn't work).
~$ mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
I appreciate any help with this issue since it's hindering my work.
lubuntu password 18.04 mariadb
This is a problem I got today when upgrading my Lubuntu version to 18.04. After the update, the system deleted my MariaDB packages. When I tried to installing them again the installer said the will move the current installation to another folder (so I'm not worried about data lost yet, but I need a way to import the data after I solve this.).
However, after I installed the new MariaDB package, it didn't prompt me to assign a root password (I assumed it would be the same as the previous installation) however I was wrong.
I searched the web about how to reset the root password, but after starting the service in --skip-grant-tables
mode and then assigning a new password to my MariaDB database, I still couldn't log in after a reboot. (I needed to reboot since starting the service manually didn't work).
~$ mysql -u root -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
I appreciate any help with this issue since it's hindering my work.
lubuntu password 18.04 mariadb
asked May 3 at 15:35
Gabriel I.
185
185
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Try to run it with sudo and without the password switch, like this
sudo mysql -u root
and enter your user's password normally when sudo asks for authentication.
There is a specific reason for this because mariadb now is configured by default to use "Unix socket" authentication plugin so the "root" user of mariadb uses the same credentials as the OS "root" user.
You can change this behaviour from the user configuration, but beware it can break other processes that rely on this or the installation of new software that uses MariaDB/MySQL.
An alternative can be to setup a new user with the same privileges as root and set it to not use the socket authentication plugin, so you leave the root user untouched and you can login with an user and password.
Hope it helps.
References:
- This Server Fault post
- This SuperUser post
Thank you, it worked correctly. And also I successfully recovered the data I needed.
â Gabriel I.
May 3 at 16:07
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Try to run it with sudo and without the password switch, like this
sudo mysql -u root
and enter your user's password normally when sudo asks for authentication.
There is a specific reason for this because mariadb now is configured by default to use "Unix socket" authentication plugin so the "root" user of mariadb uses the same credentials as the OS "root" user.
You can change this behaviour from the user configuration, but beware it can break other processes that rely on this or the installation of new software that uses MariaDB/MySQL.
An alternative can be to setup a new user with the same privileges as root and set it to not use the socket authentication plugin, so you leave the root user untouched and you can login with an user and password.
Hope it helps.
References:
- This Server Fault post
- This SuperUser post
Thank you, it worked correctly. And also I successfully recovered the data I needed.
â Gabriel I.
May 3 at 16:07
add a comment |Â
up vote
2
down vote
accepted
Try to run it with sudo and without the password switch, like this
sudo mysql -u root
and enter your user's password normally when sudo asks for authentication.
There is a specific reason for this because mariadb now is configured by default to use "Unix socket" authentication plugin so the "root" user of mariadb uses the same credentials as the OS "root" user.
You can change this behaviour from the user configuration, but beware it can break other processes that rely on this or the installation of new software that uses MariaDB/MySQL.
An alternative can be to setup a new user with the same privileges as root and set it to not use the socket authentication plugin, so you leave the root user untouched and you can login with an user and password.
Hope it helps.
References:
- This Server Fault post
- This SuperUser post
Thank you, it worked correctly. And also I successfully recovered the data I needed.
â Gabriel I.
May 3 at 16:07
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Try to run it with sudo and without the password switch, like this
sudo mysql -u root
and enter your user's password normally when sudo asks for authentication.
There is a specific reason for this because mariadb now is configured by default to use "Unix socket" authentication plugin so the "root" user of mariadb uses the same credentials as the OS "root" user.
You can change this behaviour from the user configuration, but beware it can break other processes that rely on this or the installation of new software that uses MariaDB/MySQL.
An alternative can be to setup a new user with the same privileges as root and set it to not use the socket authentication plugin, so you leave the root user untouched and you can login with an user and password.
Hope it helps.
References:
- This Server Fault post
- This SuperUser post
Try to run it with sudo and without the password switch, like this
sudo mysql -u root
and enter your user's password normally when sudo asks for authentication.
There is a specific reason for this because mariadb now is configured by default to use "Unix socket" authentication plugin so the "root" user of mariadb uses the same credentials as the OS "root" user.
You can change this behaviour from the user configuration, but beware it can break other processes that rely on this or the installation of new software that uses MariaDB/MySQL.
An alternative can be to setup a new user with the same privileges as root and set it to not use the socket authentication plugin, so you leave the root user untouched and you can login with an user and password.
Hope it helps.
References:
- This Server Fault post
- This SuperUser post
answered May 3 at 15:58
badger_8007
9317
9317
Thank you, it worked correctly. And also I successfully recovered the data I needed.
â Gabriel I.
May 3 at 16:07
add a comment |Â
Thank you, it worked correctly. And also I successfully recovered the data I needed.
â Gabriel I.
May 3 at 16:07
Thank you, it worked correctly. And also I successfully recovered the data I needed.
â Gabriel I.
May 3 at 16:07
Thank you, it worked correctly. And also I successfully recovered the data I needed.
â Gabriel I.
May 3 at 16:07
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2faskubuntu.com%2fquestions%2f1031609%2flubuntu-mariadb-ignores-correct-password%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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