• 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

  • Zero Trust Access for Hong Kong VPS: Secure Remote Team Access (2026)
  • Celery Task Queue on Hong Kong VPS: Async Background Jobs (2026)
  • Self-Hosted Object Storage on Hong Kong VPS: MinIO S3-Compatible (2026)
  • Hong Kong VPS vs Singapore VPS: Which for Your Asia-Pacific App in 2026?
  • IoT Data Platform on Hong Kong VPS: Edge Computing for Asia-Pacific (2026)

Recent Comments

  1. Hong Kong VPS Uptime and SLA: What 99.9% Uptime Really Means for Your Business (2026) - Server.HK on How to Monitor Your Hong Kong VPS: Uptime, Performance, and Alert Setup Guide (2026)
  2. Best Hong Kong VPS Providers in 2026: Compared by Speed, Routing, and Value - Server.HK on How to Migrate Your Website to a Hong Kong VPS: Zero-Downtime Transfer Guide (2026)
  3. vibramycin injection on How to Choose the Right Hong Kong VPS Plan: A Buyer’s Guide for 2026
  4. allopurinol for gout on CN2 GIA vs BGP vs CN2 GT: What’s the Real Difference for China Connectivity?
  5. antibiotics online purchase on How to Set Up a WordPress Site on a Hong Kong VPS with aaPanel (Step-by-Step 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