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-server_5.7.16-0ubuntu0.16.04.1_all.deb …
Unpacking mysql-server (5.7.16-0ubuntu0.16.04.1) …
Setting up mysql-server (5.7.16-0ubuntu0.16.04.1) …
root@mizzouadvantagecod:~#
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
try Dimitre’s answer here: https://stackoverflow.com/questions/7739645/install-mysql-on-ubuntu-without-a-password-prompt you can set the mysql root password before installation
I had the same problem which prevented me from being able to access mysql all the answers to use mysql_secure_installation after running sudo apt install mysql-server didn’t work. Here’s what worked
sudo apt-get update && sudo apt-get install mysql-server This time you’d be asked for a password.Hope it helps. Cheers!
It’s now fixed:
Remove all files related to MySQL
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
Then upgrade my distribution
sudo apt-get dist-upgrade
Then install MySQL
sudo apt-get install mysql-server That’s all.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.