LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2019, 03:02 AM   #1
byebyemrgates
Member
 
Registered: Nov 2017
Location: Blue Mountains, Australia!
Distribution: Mint 20, Ubuntu 20
Posts: 164

Rep: Reputation: Disabled
Question password not accepted while installing mySql


Hi there everyone! OK - brand new installation of Linux Mint 19, subsequently upgraded to Mint 19.2
Installing LAMP bit by bit; when installing MySql came to unexpected issue - somehow the password is not accepted (please see the terminal out put below.
Tried multiple times. There is only one password... It works for sudo commands fine...
Please help!

Code:
bekor@Linux1:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7
  mysql-common mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
  mailx tinyca
Recommended packages:
  libhtml-template-perl
The following NEW packages will be installed:
  libaio1 libevent-core-2.1-6 mysql-client-5.7 mysql-client-core-5.7
  mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7
0 to upgrade, 8 to newly install, 0 to remove and 7 not to upgrade.
Need to get 20.4 MB of archives.
After this operation, 160 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirror.intergrid.com.au/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7,308 B]
Get:2 http://mirror.intergrid.com.au/ubuntu bionic-updates/main amd64 libaio1 amd64 0.3.110-5ubuntu0.1 [6,476 B]
Get:3 http://mirror.intergrid.com.au/ubuntu bionic-updates/main amd64 mysql-client-core-5.7 amd64 5.7.27-0ubuntu0.18.04.1 [7,040 kB]
Get:4 http://mirror.intergrid.com.au/ubuntu bionic-updates/main amd64 mysql-client-5.7 amd64 5.7.27-0ubuntu0.18.04.1 [2,302 kB]
Get:5 http://mirror.intergrid.com.au/ubuntu bionic-updates/main amd64 mysql-server-core-5.7 amd64 5.7.27-0ubuntu0.18.04.1 [7,779 kB]
Get:6 http://mirror.intergrid.com.au/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1.8-stable-4build1 [85.9 kB]
Get:7 http://mirror.intergrid.com.au/ubuntu bionic-updates/main amd64 mysql-server-5.7 amd64 5.7.27-0ubuntu0.18.04.1 [3,196 kB]
Get:8 http://mirror.intergrid.com.au/ubuntu bionic-updates/main amd64 mysql-server all 5.7.27-0ubuntu0.18.04.1 [9,948 B]
Fetched 20.4 MB in 14s (1,445 kB/s)                                            
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 367889 files and directories currently installed.)
Preparing to unpack .../0-mysql-common_5.8+1.0.4_all.deb ...
Unpacking mysql-common (5.8+1.0.4) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../1-libaio1_0.3.110-5ubuntu0.1_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-5ubuntu0.1) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../2-mysql-client-core-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.27-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../3-mysql-client-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.27-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../4-mysql-server-core-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.27-0ubuntu0.18.04.1) ...
Selecting previously unselected package libevent-core-2.1-6:amd64.
Preparing to unpack .../5-libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb ...
Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Setting up mysql-common (5.8+1.0.4) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Selecting previously unselected package mysql-server-5.7.
(Reading database ... 368057 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.27-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.27-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.27-0ubuntu0.18.04.1_all.deb ...
Unpacking mysql-server (5.7.27-0ubuntu0.18.04.1) ...the one 
Setting up libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libaio1:amd64 (0.3.110-5ubuntu0.1) ...
Processing triggers for systemd (237-3ubuntu10.25) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up mysql-client-core-5.7 (5.7.27-0ubuntu0.18.04.1) ...
Setting up mysql-server-core-5.7 (5.7.27-0ubuntu0.18.04.1) ...
Setting up mysql-client-5.7 (5.7.27-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.27-0ubuntu0.18.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Setting up mysql-server (5.7.27-0ubuntu0.18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.25) ...

bekor@Linux1:~$ mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 
Error: Access denied for user 'root'@'localhost'
bekor@Linux1:~$ mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 
Error: Access denied for user 'root'@'localhost'
 
Old 08-21-2019, 04:05 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
the root user of the OS (linux) and the root user of mysql database are two different accounts.
Here you need to use the password for root of database, which is [most probably] documented at mysql.
 
1 members found this post helpful.
Old 08-21-2019, 11:51 AM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Yes. It's the mysql root password, not the Linux superuser root password. There are a couple of possibilities according to this search

I'd try an empty password first.
 
1 members found this post helpful.
Old 08-21-2019, 08:46 PM   #4
byebyemrgates
Member
 
Registered: Nov 2017
Location: Blue Mountains, Australia!
Distribution: Mint 20, Ubuntu 20
Posts: 164

Original Poster
Rep: Reputation: Disabled
Thanks a lot!
before I read your answers, I did some more research and fixed it with this:
Code:
sudo mysql

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
This set the password to the word "root"
 
Old 08-21-2019, 08:48 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by byebyemrgates View Post
Thanks a lot!
before I read your answers, I did some more research and fixed it with this:
Code:
sudo mysql

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
This set the password to the word "root"
There ya go!
 
1 members found this post helpful.
  


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
Password(s) accepted for login but not accepted for applications. JZL240I-U Ubuntu 29 02-14-2012 11:53 AM
VirtualBox - CD #2 not accepted while installing Adobe CS2 runbei Linux - Software 2 01-20-2009 11:59 AM
Screen Saver Password Activates but Password not accepted mccartjd Linux - Newbie 2 05-06-2008 11:37 AM
access denied password not accepted dogface Linux - Networking 4 09-20-2004 09:02 AM
root password not accepted MauricioTulua Linux - Software 3 07-04-2004 01:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:02 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