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.

ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO) | ERROR 2002 (HY000): Can’t connect to local MySQL srever through socket ‘/var/lib/mysql/mysql.sock’ (2) | Mysql server Error 2002 | Mysql login Error | mysqld_safe | mysql safe mode | reset root password in mysql

Nguồn:https://madisonrep.org/

18 Comments

Sienko_

February 16, 2020

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)

Reply

Clayton Clayton

February 16, 2020

It works man, thanks.

Reply

Willo

February 16, 2020

[email protected]:~ # 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/

Reply

Egbon Liberty

February 16, 2020

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

Reply

Lê Xuân Bình

February 16, 2020

i try with: service mysqld start have an error occur: command not found: service
i try: mysqld_safe –skip-grant-tables ->
019-08-24T13:01:54.6NZ mysqld_safe Logging to '/usr/local/var/mysql/BeeSupper-2.local.err'.
2019-08-24T13:01:54.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
2019-08-24T13:01:54.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/BeeSupper-2.local.pid ended

i try: mysqld -uroot -p
mysqld: Can not perform keyring migration : Invalid –keyring-migration-source option.
2019-08-24T13:03:35.687575Z 0 [System] [MY-010116] [Server] /usr/local/Cellar/mysql/8.0.17/bin/mysqld (mysqld 8.0.17) starting as process 4175
2019-08-24T13:03:35.690732Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2019-08-24T13:03:35.691148Z 0 [Warning] [MY-010122] [Server] One can only use the –user switch if running as root
2019-08-24T13:03:35.691201Z 0 [ERROR] [MY-011084] [Server] Keyring migration failed.
2019-08-24T13:03:35.691250Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-08-24T13:03:35.691436Z 0 [System] [MY-010910] [Server] /usr/local/Cellar/mysql/8.0.17/bin/mysqld: Shutdown complete (mysqld 8.0.17) Homebrew.

i try: mysql -uroot -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

please help me 🙁

Reply

Sonali Dattatraya Tamboli

February 16, 2020

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

Reply

zeroforce

February 16, 2020

Thanks.

Reply

Eulania Oliver

February 16, 2020

No meu apareceu esse erro:

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

Reply

Drew Norman

February 16, 2020

FLC1:~ dnorman$ mysqld_safe –skip-grant-tables
190507 23:21:57 mysqld_safe Logging to '/usr/local/var/FLC1.attlocal.net.err'.
190507 23:21:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/var
FLC1:~ dnorman$ service mysqld stop
-bash: service: command not found
FLC1:~ dnorman$

Reply

carlo sparta

February 16, 2020

Sei un grande !!

Reply

Ali Carikcioglu

February 16, 2020

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

Reply

Areeg Samir

February 16, 2020

Hello, Why I don't have Password field in the user table?

Reply

Laurent Naturel

February 16, 2020

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

Reply

Namjith Aravind

February 16, 2020

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

Reply

Sandeep Prasad Kushwaha

February 16, 2020

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

Reply

cao zheng

February 16, 2020

Thanks very much.It works for me!!!

Reply

Joaquin Del Prado

February 16, 2020

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

Reply

florian de wulf

February 16, 2020

in the cmd prompt i get this error for the command
C:Program FilesMySQLmysql-8.0.12-winx64bin>mysqld_safe –skip-grant-tables
"'mysqld_safe' is not recognized as an internal or external command,
operable program or batch file." where do i need to fill this command else?

Reply

Leave a Reply