I have a problem with install mysql_install_db.
When I call mysql_install_db I get this error:
[WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2016-10-10 16:06:57 [ERROR] The data directory needs to be specified.
root@furniture-ecommerce:~# mysqld --initialize
2016-10-10T16:13:24.343724Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-10-10T16:13:24.350429Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2016-10-10T16:13:24.350786Z 0 [ERROR] Aborting
I deleted the directory /var/lib/mysql as here recommend - post but when I call mysqld --initialize then this error occurs:
mysqld: Can't create directory '/var/lib/mysql/' (Errcode: 13 - Permission denied)
2016-10-10T16:23:29.515470Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-10-10T16:23:29.519420Z 0 [ERROR] Aborting
Can you help me with it?