Wednesday, October 20, 2021

Failed to connect to MySQL at with user root

When users connecting to MySQL using Workbench or from command prompt they may receive the error when they don’t have access to connect from the machine.

It is mainly due to security setup that allows to connect to “root” from specific IP address or localhost



In this scenario, ask your admins to create a new user account and setup the required access instead of using “root”

If the root account is not configure to authenticate with a password, you may need below command

MySQL> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';


If user need to login as root, you they can follow the steps to grant access to local host and or IP Address

MySQL> GRANT ALL ON [DB_Name].* to 'root'@'127.0.0.1' IDENTIFIED BY '[PASSWORD]';
MySQL> GRANT ALL ON [DB_Name].* to 'root'@ ‘IP Address’ IDENTIFIED BY '[PASSWORD]';

Instead of using “GRANT ALL ON”, use required privileges only.

Thanks & Regards
http://oracleracexpert.com, Oracle ACE

2 comments:

  1. When users connecting to MySQL using Workbench or from command prompt they may receive the error when they don’t have access to connect from the machine.
    cricut explore
    cricut maker 3 black friday
    cricut heat guide
    cricut heat press
    cricut joy bundle

    ReplyDelete
  2. "Solar Power Plant US Nagar represents an important opportunity for households, businesses, industries, and institutions to make greater use of clean and renewable energy. Solar panels can generate electricity from sunlight, potentially reduce dependence on grid power, lower long-term energy expenses, and contribute to environmental protection. With suitable rooftops, growing electricity demand, and increasing awareness of renewable energy, US Nagar has strong potential for continued solar adoption.

    A successful solar project requires careful planning, appropriate system sizing, quality equipment, professional installation, proper electrical safety, and regular maintenance. As solar technology continues to advance and renewable energy becomes more accessible, solar panels are likely to play an increasingly important role in the energy future of US Nagar. By adopting solar power, the region can support cleaner economic growth and move toward a more sustainable and energy-efficient future."

    ReplyDelete