If I could set the password for debian-sys-maint, then I could install the phpmyadmin package, and that would be great! But with mySQL 5.7 and some random local configuration, it is somehow Not So Easy to set passwords, because it's not obvious which authentication module I should talk to. I've tried:
mysql> alter user 'debian-sys-maint'@'localhost' identified with mysql_native_password as 'MyNewPass';
ERROR 1396 (HY000): Operation ALTER USER failed for 'debian-sys-maint'@'localhost'
mysql> alter user 'debian-sys-maint'@'localhost' identified with mysql_native_password as 'MyNewPass';
ERROR 1396 (HY000): Operation ALTER USER failed for 'debian-sys-maint'@'localhost'
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> show plugins
-> ;
+----------------------------+----------+--------------------+---------+---------+
| Name | Status | Type | Library | License |
+----------------------------+----------+--------------------+---------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| sha256_password | ACTIVE | AUTHENTICATION | NULL | GPL |
...
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
+----------------------------+----------+--------------------+---------+---------+
44 rows in set (0.00 sec)
$ apt-show-versions | grep -i mysql
dbconfig-mysql:all/xenial 2.0.4ubuntu1 uptodate
libmysqlclient-dev:amd64/xenial-security 5.7.17-0ubuntu0.16.04.1 upgradeable to 5.7.18-0ubuntu0.16.04.1
libmysqlclient-dev:i386 not installed
libmysqlclient20:amd64/xenial-security 5.7.17-0ubuntu0.16.04.1 upgradeable to 5.7.18-0ubuntu0.16.04.1
libmysqlclient20:i386 not installed
mysql-client:all/xenial-security 5.7.17-0ubuntu0.16.04.1 upgradeable to 5.7.18-0ubuntu0.16.04.1
mysql-client-5.7:amd64/xenial-security 5.7.18-0ubuntu0.16.04.1 uptodate
mysql-client-5.7:i386 not installed
mysql-client-core-5.7:amd64/xenial-security 5.7.18-0ubuntu0.16.04.1 uptodate
mysql-client-core-5.7:i386 not installed
mysql-common:all/xenial-security 5.7.18-0ubuntu0.16.04.1 uptodate
mysql-server:all/xenial-security 5.7.18-0ubuntu0.16.04.1 uptodate
mysql-server-5.7:amd64/xenial-security 5.7.18-0ubuntu0.16.04.1 uptodate
mysql-server-5.7:i386 not installed
mysql-server-core-5.7:amd64/xenial-security 5.7.18-0ubuntu0.16.04.1 uptodate
mysql-server-core-5.7:i386 not installed
php-mysql:all/xenial 1:7.0+35ubuntu6 uptodate
php7.0-mysql:amd64/xenial-security 7.0.15-0ubuntu0.16.04.4 uptodate
php7.0-mysql:i386 not installed
How can I set the password?
sudo cat /etc/mysql/debian.cnf
to see if You have password there. Idk if that will be a debian.cnf in ubuntu, check for the cnf file.SET PASSWORD FOR 'debian-sys-maint'@'localhost' = PASSWORD('Your PWD here');
after logging in to mysql as root. Set password in the file, then set it thru mysql statement.