1

I have tried the solutions presented in Error installing mysql server on Ubuntu 14.04 but I still can't get it to work. The problem i think is when I install it asks me to set password, but then i get "Unable to set password for the MySQL "root" user.

Anything else I can try?

2 Answers2

1

The "Unable to set password" message is a bit misleading. Essentially, it just means something went wrong when trying to set the password—which can be as generic as MySQL not running.

Run systemctl status mysql.service to find out if MySQL started up sucessfully. If it didn't, run sudo journalctl -xn and/or check the contents of /var/log/mysql/error.log to find out more about what's preventing it from starting.

Note that sudo apt-get purge mysql-server-5.5 will not remove config and data files. If one of them is botched, the only way to rectify this is to:

sudo apt-get purge mysql-server-5.5
sudo rm -R /etc/mysql
sudo rm -R /var/lib/mysql
sudo apt-get install mysql-server

Important: Don't do this if you have data in your MySQL installation, as this will ERASE all your MySQL data. On a fresh install, you've got nothing to lose. Otherwise, make sure you know what you're doing.

user149408
  • 1,431
0

If you haven't attempted this already, use:

mysql_install_db
/usr/bin/mysql_secure_installation
Eliah Kagan
  • 117,780
  • Thanks this worked with a few additions.
    1. The first command complained about having log_slow_verbosity, so I had to remove from the my.cnf 2) Then I had to start service. 3) /usr/bin/mysql_secure_installation
    – CptanPanic May 09 '15 at 11:12