Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu 16.04 mysql_old_password cannot be loaded

Tags:

mysql

ubuntu

I want to connect to the mysql database on the external server with shell command. Ubuntu version 16.04.

 mysql -uXXXXXX -pYYYYYY -h domain.com

I get error:

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2059 (HY000): Authentication plugin 'mysql_old_password' cannot be loaded: /usr/lib/mysql/plugin/mysql_old_password.so: cannot open shared object file: No such file or directory
like image 393
Erdem Çetin Avatar asked Dec 26 '16 08:12

Erdem Çetin


2 Answers

Maybe you simply need to install the mysql (mariadb) client by running like:

sudo apt-get install mariadb-client

The above command fixed it on my Ubuntu 16.04.2 LTS installation when I had this very issue.

like image 163
Chris Avatar answered Oct 13 '22 07:10

Chris


Password hashing has changed since MySQL 5.7.5, so many clients and recent MySQL versions don't support unsafe, pre-4.1 passwords anymore.

To make your password more secure, follow the steps from Cannot connect to MySQL 4.1+ using old authentication

With access to the server: https://stackoverflow.com/a/1576473/1875965 Check your current configuration and the current password settings, find and change users with old passwords

Without access to the server: https://stackoverflow.com/a/2901706/1875965 Connect to the server with an old client, change your password and update the settings

like image 2
Sandra Avatar answered Oct 13 '22 07:10

Sandra