{"id":25219868,"url":"https://github.com/mircobabin/mysqlpasswords","last_synced_at":"2026-05-05T23:32:34.325Z","repository":{"id":275960685,"uuid":"927749623","full_name":"MircoBabin/MySqlPasswords","owner":"MircoBabin","description":"MySql Passwords is a tool for calculating the MySql hash of mysql_native_password and caching_sha2_password password plugins. This is the authentication_string field in the mysql.user table.","archived":false,"fork":false,"pushed_at":"2025-02-27T10:30:23.000Z","size":76,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T10:44:20.069Z","etag":null,"topics":["csharp","delphi","hashing","mysql","passwords","php"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MircoBabin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T13:36:43.000Z","updated_at":"2025-03-12T18:05:17.000Z","dependencies_parsed_at":"2025-02-27T11:38:39.058Z","dependency_job_id":"61cc2f4b-00fc-44fe-863f-0cad92ea927f","html_url":"https://github.com/MircoBabin/MySqlPasswords","commit_stats":null,"previous_names":["mircobabin/mysqlpasswords"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MircoBabin/MySqlPasswords","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MircoBabin%2FMySqlPasswords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MircoBabin%2FMySqlPasswords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MircoBabin%2FMySqlPasswords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MircoBabin%2FMySqlPasswords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MircoBabin","download_url":"https://codeload.github.com/MircoBabin/MySqlPasswords/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MircoBabin%2FMySqlPasswords/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32672632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","delphi","hashing","mysql","passwords","php"],"created_at":"2025-02-10T21:42:00.175Z","updated_at":"2026-05-05T23:32:34.299Z","avatar_url":"https://github.com/MircoBabin.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Github All Releases](https://img.shields.io/github/downloads/MircoBabin/MySqlPasswords/total)](https://github.com/MircoBabin/MySqlPasswords/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/MircoBabin/MySqlPasswords/blob/master/LICENSE.md)\n\n# MySql Passwords\nMySql Passwords is a tool for calculating the MySql hash of mysql_native_password and caching_sha2_password password plugins. This is the authentication_string field in the mysql.user table.\n\n# Programming languages\n\n- [Documentation for C#.](docs/CSharp.md)\n- [Documentation for Delphi.](docs/Delphi.md)\n- [Documentation for Php.](docs/Php.md)\n\n# Why\n\nThe next sql statements are not secure, because they send the password 'secret' in plain text to the MySql server. The tcp/ip connection maybe compromised, allowing an attacker to sniff the plain text password. The statement maybe logged or maybe disclosed in other ways.\n\n```sql\nCREATE USER 'root'@'%' IDENTIFIED BY 'secret'; -- !!! INSECURE !!!\n\nALTER USER 'root'@'%' IDENTIFIED BY 'secret'; -- !!! INSECURE !!!\n```\n\nChanging the password of a MySql user in a secure way, requires calculating the hash of the password. So the password is send as a hash to the MySql server and not in plain text anymore. The next commands send the value of authentication_string in the mysql.user table. Which is secure, even if intercepted by an attacker or logged or ....\n\n```sql\nCREATE USER 'root'@'%' IDENTIFIED WITH caching_sha2_password AS 0x24412430303524517D22565B3D67635E4136625E414272223A522F373248496B496B7368563976366D73677476794E6F574C6C4346554662416E66753746637958455047332E;\n\nALTER USER 'root'@'%' IDENTIFIED WITH caching_sha2_password AS 0x24412430303524517D22565B3D67635E4136625E414272223A522F373248496B496B7368563976366D73677476794E6F574C6C4346554662416E66753746637958455047332E;\n```\n\nCalculating the correct hash of plain text password is not well documented by the MySql team. After some investigation I managed to retrieve the algorithm for:\n\n- caching_sha2_password. Recommended.\n- mysql_native_password. Deprecated. Disabled by default from MySql 8.4. And removed from MySql 9.0.\n\n# Contributions\nContributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md \"contributing\") before making any contribution!\n\n# License\n[The license is MIT.](LICENSE.md \"license\")\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmircobabin%2Fmysqlpasswords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmircobabin%2Fmysqlpasswords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmircobabin%2Fmysqlpasswords/lists"}