Question
No password is asked when installing mysql-server
No password is asked when installing mysql-server.
this is the output I have from the terminal :
root@mizzouadvantagecod:~# sudo apt-get install mysql-server
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
mysql-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/10.1 kB of archives.
After this operation, 106 kB of additional disk space will be used.
Selecting previously unselected package mysql-server.
(Reading database … 85555 files and directories currently installed.)
Preparing to unpack …/mysql-server5.7.16-0ubuntu0.16.04.1all.deb …
Unpacking mysql-server (5.7.16-0ubuntu0.16.04.1) …
Setting up mysql-server (5.7.16-0ubuntu0.16.04.1) …
root@mizzouadvantagecod:~#
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
When I was following along the Digital Ocean guide, my Ubuntu 18.04 server did not ask to set the MySQL root user password during apt-get install mysql-server. I was able to login to MySQL and manually set the password using the following commands
I then needed to run
mysql_secure_installation
using thesudo
commandThe
sudo
was not mentioned in the guide. When I ran it without sudo, I got the following error:Error: Access denied for user ‘root’@'localhost’
Hope this is helpful for others.