I managed to either forget or not configure the root password for the MySQL instance on my Raspberry Pi…

While searching around I found some step by step instructions on Ask Ubuntu (A Stack Exchange site), by a user named Amigo Chan… They worked a treat;

  1. Ctrl + Alt + T to launch terminal

  2. sudo dpkg-reconfigure phpmyadmin

  3. Connection method for MySQL database for phpmyadmin: unix socket

  4. Name of the database’s administrative user: root

  5. Password of the database’s administrative user: mysqlsamplepassword

  6. MySQL username for phpmyadmin: root

  7. MySQL database name for phpmyadmin: phpmyadmin

  8. Web server to reconfigure automatically: apache2

  9. ERROR 1045

  10. ignore

  11. sudo dpkg-reconfigure mysql-server-5.5

  12. New password for the MySQL “root” user: mysqlsamplepassword

  13. Repeat password for the MySQL “root” user: mysqlsamplepassword

  14. After all this run following command on terminal to secure your mysql server. sudo mysql_secure_installation

  15. Enter current password for root (enter for none): mysqlsamplepassword

  16. Change the root password? [fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][Y/n] n

  17. Remove anonymous users? [Y/n] y

  18. Disallow root login remotely? [Y/n] y

  19. Remove test database and access to it? [Y/n] y

  20. Reload privilege tables now? [Y/n] y

The original answer can be found here.[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

By |2017-07-24T08:33:16+01:00February 10th, 2015|Data, Linux, MySQL, phpMyAdmin, Raspberry Pi, Tips|0 Comments

About the Author:

Leave A Comment