ERROR 1045 28000 Access denied for user 'root'@'localhost' using password NO | Coding Tricks

preview_player
Показать описание
Hi Friends,
In this video we are going to see a very easy solution for Mysql server login error, Sometime we are not able to login if we forget mysql password, Here is the soluthion how to reset it with new password.

Рекомендации по теме
Комментарии
Автор

work i love you

i recovered my databases

nunorodrigues
Автор

You saved me out of access denied trap. Thanks!

jaehochoi
Автор

thnku, i was rlly stuck in my work, it rlly helped a lot!

kaustubhkrishna
Автор

If anyone having 1045(2800) error then try this command
-> *mysql -u root -p*
Its working for linux 🐥

sonalidattatrayatamboli
Автор

1. Stop mysql:
systemctl stop mysqld
2. Set the mySQL environment option
systemctl set-environment
3. Start mysql usig the options you just set
systemctl start mysqld
4. Login as root
mysql -u root
5. Update the root user password with these mysql commands
mysql> UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPassword')
-> WHERE User = 'root' AND Host = 'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
*** Edit ***
As mentioned my shokulei in the comments, for 5.7.6 and later, you should use
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
Or you'll get a warning
6. Stop mysql
systemctl stop mysqld
7. Unset the mySQL envitroment option so it starts normally next time
systemctl unset-environment MYSQLD_OPTS
8. Start mysql normally:
systemctl start mysqld
Try to login using your new password:
7. mysql -u root -p
Regards

LalatenduSwain
Автор

it works for me .... Can't thank u enough

mouadriali
Автор

I'm getting a "command not found: mysqld_safe"
What should I do?

seddyverse
Автор

FreeBSD is command
1 - #mysqld_safe --skip-grant-tables --skip-networking
2 -#mysql -u root
3 - mysql> UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
4 - mysql>quit
5 - # service mysql-server start

gschayder
Автор

No meu apareceu esse erro:


mysql> select User, Password, Host from user
-> ;
ERROR 1054 (42S22): Unknown column 'Password' in 'field list'
mysql> select User;

eulaniaoliver
Автор

Thx, my server mysql under wsl now work with workbench!!!

cybernetiks
Автор

i am getting Error mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists. Have any solution?

namjitharavind
Автор

Hi i use an VPS for an game server and i can't enter in my phpmyadmin because he said to me #1045 - Access denied for user 'root'@'localhost' (using password: YES) and mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)

lapinornithorynque
Автор

I'm getting this error please help me
Failed to stop mysqld.service: Unit mysqld.service not loaded.

pysandeep
Автор

simply uninstall mysql and install mariadb (it's a version of mysql) it will work then

alicarikcioglu
Автор

Maybe you just have to write
mysql -u root without write a semicolon in command line

medbocif
Автор

im getting bad handshake error .what should i do

Selvi
Автор

I'm using cpanel phpmyadmin, and I'm getting this same error, please how do I fix it?

egbonliberty
Автор

root@:~ # service mysqld stop
mysqld does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)
what i need to do/

Willoplus
Автор

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

camilogonzalez
Автор

when i use command: sudo service mysqld stop
i have an error: Failed to stop mysqld.service: Unit mysqld.service not loaded.

joaquindelprado