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-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:~#

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

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!

Check the mysql logs: grep ‘temporary password’ /var/log/mysqld.log

try Dimitre’s answer here: you can set the mysql root password before installation