I got the same error yesterday. I installed mariadb in the past, but forgot about this and then tried to use and install mysql. My solution was a complete uninstall of mysql and mariadb and a clean install of mariadb. Especially the fact that Gerardo tries to connect to a mysql server, but mysql-server-5.7 is not installed on his/her machine makes me think that mariadb might be involed, because I got equal error messages.
Maybe this is related to #1490071 my setup: ubuntu 16.04, amd64, mysql Ver 15.1 Distrib 10.0.29-MariaDB -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1607938 Title: mysql_upgrade: Got error: 1045: Access denied for user 'debian-sys- maint'@'localhost' (using password: YES) while connecting to the MySQL server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1607938/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs