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?

2
  • Which "root password" has the $ in it that you need to change?
    – Chindraba
    Feb 27, 2017 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, 2017 at 12:09

1 Answer 1

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.

3
  • @dr01-same for phpmyadmin?
    – Shanu k k
    Feb 27, 2017 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, 2017 at 12:20
  • @dr01 Point number 2 does not work on Linux Mint Tessa.
    – Socrates
    Jan 16, 2019 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .