• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

How to Fix MySQL Error 1275 – SQLSTATE: HY000 (ER_SERVER_IS_IN_SECURE_AUTH_MODE) Server is running in –secure-auth mode, but ‘%s’@’%s’ has a password in the old format; please change the password to the new format

December 20, 2023

How to Fix MySQL Error 1275 – SQLSTATE: HY000 (ER_SERVER_IS_IN_SECURE_AUTH_MODE)

MySQL is a popular open-source relational database management system used by many websites and applications. However, sometimes users may encounter an error message that says “Error 1275 – SQLSTATE: HY000 (ER_SERVER_IS_IN_SECURE_AUTH_MODE) Server is running in –secure-auth mode, but ‘%s’@’%s’ has a password in the old format; please change the password to the new format.” This error occurs when the MySQL server is running in secure authentication mode, but the user account has a password in the old format.

Understanding the Error

Before we dive into the solution, let’s understand the error message in more detail. The error message consists of two parts:

  1. Error Code: 1275 – SQLSTATE: HY000 (ER_SERVER_IS_IN_SECURE_AUTH_MODE)
  2. Error Message: Server is running in –secure-auth mode, but ‘%s’@’%s’ has a password in the old format; please change the password to the new format.

The error code “1275” indicates that the server is running in secure authentication mode. Secure authentication mode is a feature introduced in MySQL 5.7.5 to enhance the security of user authentication. It requires user accounts to have passwords stored in the new format, which uses a stronger hashing algorithm.

The error message indicates that the user account specified in ‘%s’@’%s’ has a password in the old format. This means that the password for the user account needs to be updated to the new format to comply with the secure authentication mode.

Fixing the Error

To fix the MySQL error 1275, you need to update the password for the user account to the new format. Here are the steps to follow:

  1. Step 1: Connect to the MySQL server using a client application or the command line.
  2. Step 2: Identify the user account that needs to be updated. In the error message, ‘%s’@’%s’ represents the username and the host from which the user is connecting.
  3. Step 3: Change the password for the user account using the following command:
ALTER USER 'username'@'host' IDENTIFIED WITH mysql_native_password BY 'new_password';

Replace ‘username’ with the actual username and ‘host’ with the actual host from the error message. Also, replace ‘new_password’ with the desired new password for the user account.

For example, if the error message is “Server is running in –secure-auth mode, but ‘john’@’localhost’ has a password in the old format; please change the password to the new format,” you would use the following command:

ALTER USER 'john'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';

Make sure to choose a strong password that meets the MySQL password requirements.

Once you have executed the command, the password for the user account will be updated to the new format, and the error should no longer occur.

Summary

In conclusion, the MySQL error 1275 – SQLSTATE: HY000 (ER_SERVER_IS_IN_SECURE_AUTH_MODE) occurs when the server is running in secure authentication mode, but the user account has a password in the old format. To fix the error, you need to update the password for the user account to the new format using the ALTER USER command. For more information about VPS hosting and how it can benefit your website or application, visit Server.HK.

Recent Posts

  • NVMe SSD vs SATA SSD for VPS Hosting: Does Storage Type Really Matter?
  • Hong Kong VPS Docker Setup: Run Containers with Full Root Access
  • How to Set Up a Game Server on Hong Kong VPS: Low-Latency Gaming for Asia
  • How to Deploy a Node.js Application on Hong Kong VPS: Complete Guide
  • How to Set Up a WordPress Site on a Hong Kong VPS with aaPanel (Step-by-Step 2026)

Recent Comments

  1. hello world on Top 5 Use Cases for a Hong Kong Dedicated Server in 2026

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot