Comments - mysql_secure_installation

3 years, 9 months ago John King

On arch I followed these these steps

sudo zfs create -o recordsize=8k -o primarycache=metadata -o mountpoint=/srv/data zdata/data sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/srv/data sudo systemctl start mysqld sudo mysql_secure_installation

The last command asks for the current password. Dispite it saying that the password should be empty, this does not work:

Enter current password for root (enter for none): ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Please update this description and correct the error.


1 year, 2 months ago Orlando Palencia

In Linux Mint you have to add sudo before run this script: $ sudo mysql_secure_installation

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) this will show you if you do not add sudo.

I have used mysql in Ubuntu and no need to add sudo to use it.

For example: Ubuntu: $ mysql -u root -p, this work fine. Linux Mint: $ sudo mysql -u root -p

2 years, 1 month ago Ian Gilfillan

This seems normal. If there's a root password it needs to be specified. Only if there is none does simply pressing enter work.