0

I have recently installed Linux Mint. I have installed

1) Lamp

2) Set up MySQL

3) Test Apache

4) Test PHP

5) Phpmyadmin

Everything was working fine. Unfortunately my password include $ character.

Then I discovered that characters ?{}|&~![()^" must not be used anywhere in the key and have a special meaning in the value. I tried SET PASSWORD FOR root@localhost = PASSWORD('yourpassword'); but it's not working. So how can I change the root password for MySQL and phpmyadmin?

  • Which "root password" has the $ in it that you need to change? – user207673 Feb 27 '17 at 12:04
  • @GypsySpellweaver both Mysql and phpmyadmin are same.if i use parse_ini_file its not connected to db.please helpme – Shanu k k Feb 27 '17 at 12:09
2

You need to do this:

  1. Stop the MySQL server
  2. Restart the MySQL server skipping the grant tables: mysqld_safe --skip-grant-tables --skip-networking &

  3. Connect to the MySQL server passwordlessly: mysql -uroot

  4. Reload the grant tables: FLUSH PRIVILEGES;
  5. Change the root password: SET PASSWORD FOR 'root'@'localhost' = PASSWORD('hello');
  6. Stop the MySQL server and restart it normally
  7. You can now connect to MySQL as root with password hello

Concerning phpMyAdmin, it uses MySQL credentials. So once you have regained MySQL's root password, you'll be able to manage everything.

|improve this answer|||||
  • @dr01-same for phpmyadmin? – Shanu k k Feb 27 '17 at 12:17
  • phpMyAdmin uses MySQL credentials. Once you have regained MySQL's root password, you'll be able to manage everything. – dr_ Feb 27 '17 at 12:20
  • @dr01 Point number 2 does not work on Linux Mint Tessa. – Socrates Jan 16 '19 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.