how to retrieve/reset phpmyadmin password [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
manuleka

how to retrieve/reset phpmyadmin password [SOLVED]

Post by manuleka »

i've just fixed my lamp installation so php is functioning ok now but i've forgotten the phpmyadmin password (i'm guessing this is the same as mysql) :(

can anyone give me directions or quick guide on how to retrieve this password (or reset it)? is it stored in a file? this lamp server is installed for localhost testing purposes only...
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
pompom

Re: how to retrieve/reset phpmyadmin password

Post by pompom »

Hi,

First, we need to stop the daemon

Code: Select all

sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables --skip-networking &
mysql -u root
UPDATE root SET password=PASSWORD('newpassword')
FLUSH PRIVILEDGES (if necessary)
sudo /etc/init.d/mysql restart
and for "password' be sure to use anything that is easily accessible on Facebook and your favorite social networking sites, such as your favorite girlfriend's name, a pet name, an anniversary date and the ilk, which anyone should have no trouble retrieving. Remember that adding a digit makes the password 70 times more difficult to crack, but password generating programs that produce random characters are probably a safer bet.

Regards,

pompom
manuleka

Re: how to retrieve/reset phpmyadmin password

Post by manuleka »

Code: Select all

~ $ sudo /etc/init.d/mysql stop
[sudo] password for manu: 
sudo: /etc/init.d/mysql: command not found

$ cd /etc/init.d
/etc/init.d $ sudo mysql stop
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
what is this telling me?
Habitual

Re: how to retrieve/reset phpmyadmin password

Post by Habitual »

as root:

Code: Select all

mysqld_safe –skip-grant-tables
mysql
use mysql;
update user set Password=PASSWORD(‘newpassword’) where user=’root’;
flush privileges;
exit;
service mysqld restart
manuleka

Re: how to retrieve/reset phpmyadmin password

Post by manuleka »

Code: Select all

 
# mysqld_safe -skip-grant-tables
The program 'mysqld_safe' can be found in the following packages:
 * mysql-server-5.1
 * mysql-cluster-server-5.1
Try: apt-get install <selected package>
was my installation incomplete or something? missing a few core packages? this is weird...
manuleka

Re: how to retrieve/reset phpmyadmin password

Post by manuleka »

ran this:

Code: Select all

sudo aptitude install mysql-server
when i run phpinfo() it seem to show mysql there, but i'm newbie so i guess it wasn't installed... cheers anyways for the help :)
Locked

Return to “Beginner Questions”