Description\n-----------\n\nThe mysql_old_password authentication plugin is the default authentication plugin that is used for an account created when no authentication plugin is explicitly mentioned and old_passwords=1 is set. It uses the pre-MySQL 4.1 password hashing algorithm, which is also used by the OLD_PASSWORD() function and by the PASSWORD() function when old_passwords=1 is set.\n\nIt is not recommended to use the mysql_old_password authentication plugin for new installations. The password hashing algorithm is no longer secure, and the plugin is primarily provided for backward compatibility. The ed25519 authentication plugin is a more modern authentication plugin that provides simple password authentication.\n\nInstalling the Plugin\n\nThe mysql_old_password authentication plugin is statically linked into the server, so no installation is necessary.\n\nCreating Users\n\nThe easiest way to create a user account with the mysql_old_password authentication plugin is to make sure that old_passwords=1 is set, and create a user account via CREATE USER that does not specify an authentication plugin, but instead specifies a password via the IDENTIFIED BY clause:\n\n``sql\nSET old_passwords=1;\nCREATE USER username@hostname IDENTIFIED BY 'mariadb';\n`\n\nIf SQL_MODE does not have NO_AUTO_CREATE_USER set, then you can also create the user via GRANT:\n\n`sql\nSET old_passwords=1;\nGRANT SELECT ON db. TO username@hostname IDENTIFIED BY 'mariadb';\n`\n\nYou can also create the user account by providing a password hash via the IDENTIFIED BY PASSWORD clause, and MariaDB validates whether the password hash is one that is compatible with mysql_old_password:\n\n`sql\nSET old_passwords=1;\nQuery OK, 0 rows affected (0.000 sec)\n\nSELECT PASSWORD('mariadb');\n+---------------------+\n| PASSWORD('mariadb') |\n+---------------------+\n| 021bec665bf663f1    |\n+---------------------+\n1 row in set (0.000 sec)\n\nCREATE USER username@hostname IDENTIFIED BY PASSWORD '021bec665bf663f1';\nQuery OK, 0 rows affected (0.000 sec)\n`\n\nSimilar to all other authentication plugins, you could also specify the name of the plugin in the IDENTIFIED VIA clause, while providing the password hash as the USING clause:\n\n`sql\nCREATE USER username@hostname IDENTIFIED VIA mysql_old_password USING '021bec665bf663f1';\nQuery OK, 0 rows affected (0.000 sec)\n`\n\nChanging User Passwords\n\nYou can change a user account's password with the SET PASSWORD statement, while providing the plain-text password as an argument to the PASSWORD() function:\n\n`sql\nSET PASSWORD =  PASSWORD('new_secret')\n`\n\nYou can also change the user account's password with the ALTER USER statement. You have to make sure that old_passwords=1 is set, and you have to specify a password via the IDENTIFIED BY clause:\n\n`sql\nSET old_passwords=1;\nALTER USER username@hostname IDENTIFIED BY 'new_secret';\n`\n\nClient Authentication Plugins\n\nFor clients that use the libmysqlclient or MariaDB Connector/C libraries, MariaDB provides one client authentication plugin that is compatible with the mysql_old_password authentication plugin:\n\n mysql_old_password\n\nWhen connecting with a client or utility to a server as a user account that authenticates with the mysql_old_password authentication plugin. You may need to tell the client where to find the relevant client authentication plugin by specifying the --plugin-dir option:\n\n`bash\nmysql --plugin-dir=/usr/local/mysql/lib64/mysql/plugin --user=alice\n`\n\nHowever, the mysql_old_password client authentication plugin is generally statically linked into client libraries like libmysqlclient or MariaDB Connector/C, so this is not usually necessary.\n\nmysql_old_password\n\nThe mysql_old_password client authentication plugin hashes the password before sending it to the server.\n\nSupport in Client Libraries\n\nThe mysql_old_password` authentication plugin is one of the conventional authentication plugins, so all client libraries should support it.\n\nURL: https://mariadb.com/docs/server/reference/plugins/authentication-plugins/authentication-plugin-mysql_old_password