3070
MySQLWARNINGCriticalDeprecationHIGH confidence

Deprecated syntax warning

Production Risk

Low — functionality works now but will break after a future upgrade.

What this means

A SQL statement or option is using deprecated syntax. The feature may be removed in a future MySQL version.

Why it happens
  1. 1Using syntax or features marked as deprecated in the current MySQL version.
  2. 2Using old-style replication or privilege syntax.
How to reproduce
trigger — this will error
trigger — this will error
GRANT ALL PRIVILEGES ON *.* TO 'user'@'host' IDENTIFIED BY 'pass';

expected output

Warning (Code 3070): 'GRANT ... IDENTIFIED BY' is deprecated and will be removed in a future release.

Fix

Use modern syntax equivalents

Use modern syntax equivalents
CREATE USER IF NOT EXISTS 'user'@'host' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'host';

Why this works

Separating user creation from privilege grants follows modern best practices.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3070 ER_WARN_DEPRECATED_SYNTAX

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors