<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mysql-9-x-moving-away-from-sha1-and-md5-ytfsxvrai" -->

---
title: MySQL 9.x: Moving Away From SHA1 and MD5 | daily.dev
description: MySQL 9.6 removed MD5(), SHA1(), and SHA() as native built-in SQL functions, moving them to an optional Legacy Hashing Component. The recommended migration...
canonical: https://daily.dev/posts/mysql-9-x-moving-away-from-sha1-and-md5-ytfsxvrai
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: MySQL 9.x: Moving Away From SHA1 and MD5 | daily.dev
og:description: MySQL 9.6 removed MD5(), SHA1(), and SHA() as native built-in SQL functions, moving them to an optional Legacy Hashing Component. The recommended migration...
og:url: https://daily.dev/posts/mysql-9-x-moving-away-from-sha1-and-md5-ytfsxvrai
og:image: https://api.daily.dev/og/posts/ytFSxvRai.png
og:image:alt: MySQL 9.x: Moving Away From SHA1 and MD5
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MySQL 9.x: Moving Away From SHA1 and MD5

**[Planet MySQL](https://daily.dev/sources/planet-mysql)** · 11 min read · 0 upvotes · 0 comments

## Summary

MySQL 9.6 removed MD5(), SHA1(), and SHA() as native built-in SQL functions, moving them to an optional Legacy Hashing Component. The recommended migration path is to replace these with SHA2(), choosing an appropriate digest size (224, 256, 384, or 512) based on data sensitivity. Generated columns using legacy hash functions require schema changes before upgrading since the component-provided functions are loadable functions and cannot be used in generated column expressions. The post provides SQL queries to audit views, stored procedures, triggers, and events for legacy hash usage, along with a step-by-step upgrade plan and decision matrix. Installing the legacy component should be treated as a temporary compatibility measure with documented justification, especially in regulated environments where MD5/SHA-1 usage may trigger compliance findings.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blogs.oracle.com/mysql/mysql-9-x-moving-away-from-sha1-and-md5>

## Similar posts on daily.dev

- [Git 3.0 Migration Guide: Transitioning to SHA-256 & Reftables](https://daily.dev/posts/git-3-0-migration-guide-transitioning-to-sha-256-reftables-df76xg60l) · SitePoint · 0 upvotes · 0 comments
- [From MD5 to Scram: The next security shift in PostgreSQL](https://daily.dev/posts/from-md5-to-scram-the-next-security-shift-in-postgresql-nekgwu5a0) · CYBERTEC PostgreSQL · 21 upvotes · 0 comments
- [A Practical Demo of Zero-Downtime Migrations Using Password Hashing](https://daily.dev/posts/a-practical-demo-of-zero-downtime-migrations-using-password-hashing-f5wbg19kz) · Milan Jovanović · 0 upvotes · 0 comments
- [COSCUP 2026: Planning your upgrade to MySQL 9.7](https://daily.dev/posts/coscup-2026-planning-your-upgrade-to-mysql-9-7-ephf70afu) · Planet MySQL · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#database](https://daily.dev/tags/database), [#mysql](https://daily.dev/tags/mysql)

[View this post on daily.dev](https://daily.dev/posts/mysql-9-x-moving-away-from-sha1-and-md5-ytfsxvrai)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"MySQL 9.x: Moving Away From SHA1 and MD5","url":"https://daily.dev/posts/mysql-9-x-moving-away-from-sha1-and-md5-ytfsxvrai","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mysql-9-x-moving-away-from-sha1-and-md5-ytfsxvrai"},"datePublished":"2026-07-09T17:34:03.934Z","dateModified":"2026-08-24T06:55:54.617Z","description":"MySQL 9.6 removed MD5(), SHA1(), and SHA() as native built-in SQL functions, moving them to an optional Legacy Hashing Component. The recommended migration...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Planet MySQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet MySQL","logo":"https://media.daily.dev/image/upload/s--UKAtmXTq--/f_auto,q_auto/v1780213421/logos/planet-mysql?_a=BAMAMiWQ0","url":"https://daily.dev/sources/planet-mysql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/mysql-9-x-moving-away-from-sha1-and-md5-ytfsxvrai","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,database,mysql","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet MySQL","item":"https://daily.dev/sources/planet-mysql"},{"@type":"ListItem","position":3,"name":"MySQL 9.x: Moving Away From SHA1 and MD5"}]}
```

