skip to Main Content

I forgot the root password for MySQL server on my MYCloud EX2 Ultra (4.14.22-armada-18.09.3)

When logging in here:

  • http:///phpMyAdmin/index.php

I get:

  • mysqli::real_connect(): (HY000/1045): Access denied for user ‘test’@’localhost’ (using
    password: YES)

And within etc:

I can find my.cnf:

[mysqld]
bind-address=127.0.0.1
user = test
password = test1234

I’ve tried adding the user and password here but no success. Anyone have any idea on how to get this password reset?

2

Answers


  1. You can follow these steps:

    Stop the MySQL Server:

    sudo service mysql stop
    

    Start MySQL in Safe Mode:

    sudo mysqld_safe --skip-grant-tables &
    

    Access MySQL without Password:

    mysql -u root
    

    Use the MySQL Database:

    use mysql;
    

    Update the Password:

    update user set authentication_string=password('NEW_PASSWORD') where user='root';
    

    Replace NEW_PASSWORD with your desired password.

    Flush Privileges:

    flush privileges;
    

    Exit MySQL:

    exit;
    

    Stop MySQL Safe Mode:

    sudo service mysql stop
    

    Start MySQL Normally:

    sudo service mysql start
    

    Now you should be able to login with the new password. Ensure to replace NEW_PASSWORD with the actual password you want to set.

    Login or Signup to reply.
  2. MYSQL ROOT PASSWORD RESET IN CASE OF FORGOT

    Run the following Commands Step by Step (Tested on Windows 10 With MYSQL 8 VERSION)

    1. Open Command Prompt / PowerShell (run as administrator)

    Run Command:-

    net stop mysql;
    
    mysqld --console --skip-grant-tables --shared-memory; 
    

    Now Open Another Power Shell As Administrator and Run the Following Commands:
    (Remember Do Not Close the Running PowerShell/CMD Window..keep it open until you follow these steps:)-

    mysql -u root;
    
    UPDATE mysql.user SET authentication_string=null WHERE User='root';
    FLUSH PRIVILEGES;
    exit;
    
    mysql -u root;
    ALTER USER 'root'@localhost' IDENTIFIED WITH caching_sha2_password BY 'newpassword';
    FLUSH PRIVILEGES;
    exit;
    
    mysql -u root -p
    Enter Password: newpassword;
    

    mysql>SHOW DATABASES;

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search