CARI Infonet

 Forgot password?
 Register

ADVERTISEMENT

View: 1881|Reply: 3

[IT & Technology] ERROR 2002 (HY000): Can't connect to local MySQL server

[Copy link]
Post time 7-3-2023 01:44 AM | Show all posts |Read mode
I installed LAMP on Ubuntu and then set root password on phpMyAdmin. I forgot the password and now I am unable to login. When I try to change password through terminal I get this error.
How can I fix this? I am unable to open LAMP, uninstall it, or reinstall it.

Reply

Use magic Report


ADVERTISEMENT


Post time 7-3-2023 01:52 AM | Show all posts
Since many people now work with databases, I think this information will be relevant. I also have a useful article where I learned about database compare sql server  . Here you can also find a list of tools that will help automate this work and significantly speed up the process. You can also find free tools that work great too.
Reply

Use magic Report

Post time 7-3-2023 02:53 AM | Show all posts
Edited by jeon33 at 7-3-2023 02:56 AM

If you are unable to login to phpMyAdmin due to a forgotten password, you can reset it by following these steps:
  • Open a terminal window and log in to MySQL as the root user by typing the following command and entering your root password when prompted:
    mysql -u root -p
  • Once you are logged in, enter the following command to change the password for the phpMyAdmin user (replace 'newpassword' with your desired password): UPDATE mysql.user SET authentication_string=PASSWORD('newpassword') WHERE User='phpmyadmin';
  • Then, flush the privileges by running the following command: FLUSH PRIVILEGES;
  • Finally, exit the MySQL prompt by typing: exit                                                                                                                                                                                             You should now be able to log in to phpMyAdmin using the new password.
    Regarding the error you are getting when trying to change the password through the terminal, it would be helpful if you could provide more information about the error message you are seeing. However, if you are unable to open LAMP, uninstall it, or reinstall it, you may need to check if there are any processes that are preventing you from doing so. You can use the following command to check if Apache or MySQL is running:

sudo service apache2 status sudo service mysql status
If either of these services is running, you can stop them by typing:
sudo service apache2 stop
sudo service mysql stop
Then, you can proceed with the installation or uninstallation of LAMP.




Reply

Use magic Report

Post time 9-3-2023 04:00 PM | Show all posts
Can't connect to local MySQL server error might occur: [backcolor=rgba(80, 151, 255, 0.18)]mysqld is not running on the local host. Check your operating system's process list to ensure the mysqld process is present. You're running a MySQL server on Windows with many TCP/IP connections to it.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CARI Infonet

3-5-2024 09:26 PM GMT+8 , Processed in 0.202203 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list