Установил на Ubuntu 16.04 Mysql
выводит ошибку
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-01-24 17:24:56 MSK; 11min ago
Docs: man:systemd-sysv-generator(8)
Jan 24 17:24:25 yii2basic /etc/init.d/mysql[9645]: /etc/init.d/mysql: line 114: /usr/bin/mysqld_safe: No such file or directory
Jan 24 17:24:56 yii2basic /etc/init.d/mysql[9926]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jan 24 17:24:56 yii2basic /etc/init.d/mysql[9926]: [52B blob data]
Jan 24 17:24:56 yii2basic /etc/init.d/mysql[9926]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jan 24 17:24:56 yii2basic /etc/init.d/mysql[9926]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jan 24 17:24:56 yii2basic mysql[9615]: ...fail!
Jan 24 17:24:56 yii2basic systemd[1]: mysql.service: Control process exited, code=exited status=1
Jan 24 17:24:56 yii2basic systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Jan 24 17:24:56 yii2basic systemd[1]: mysql.service: Unit entered failed state.
Jan 24 17:24:56 yii2basic systemd[1]: mysql.service: Failed with result 'exit-code'.
sudo service mysql stop
sudo mysql_install_db
sudo service mysql start
sudo mysql_secure_installation
sudo mysql --user=root mysql
// выполняем три запроса, где qwerty это пароль
CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY 'qwerty';
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;