Report this

What is the reason for this report?

No password is asked when installing mysql-server

Posted on January 15, 2017

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!

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.

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

  1. Go to official mysql installation guide and follow line by line
  2. You need to download a .deb file from here that configures which version of mysql you want to install and other configurations
  3. After configurations are all done run 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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.