I am following this digital ocean tutorial for Ubuntu 14.04 to install mysql on Ubuntu 16.04 for my Rails projects. I had, maybe wrongly, assumed that the procedure would be the same.
However, when I run the command sudo mysql_install_db
, I receive the following error:
2016-06-15 18:40:36 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2016-06-15 18:40:36 [ERROR] The data directory needs to be specified.
How can I complete the setup? I have successfully followed the same procedure several times in the past on Ubuntu 14.04.
mysqld --initialize
?mysqld: Can't create directory '/var/lib/mysql/' (Errcode: 17 - File exists) 2016-06-15T14:00:28.483462Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-06-15T14:00:28.484374Z 0 [ERROR] Aborting
/var/lib/mysql
and rerunning the--initialize
process.