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;
-
Ctrl + Alt + T to launch terminal
-
sudo dpkg-reconfigure phpmyadmin
-
Connection method for MySQL database for phpmyadmin: unix socket
-
Name of the database’s administrative user:
root
-
Password of the database’s administrative user: mysqlsamplepassword
-
MySQL username for phpmyadmin: root
-
MySQL database name for phpmyadmin: phpmyadmin
-
Web server to reconfigure automatically: apache2
-
ERROR 1045
-
ignore
-
sudo dpkg-reconfigure mysql-server-5.5
-
New password for the MySQL “root” user: mysqlsamplepassword
-
Repeat password for the MySQL “root” user: mysqlsamplepassword
-
After all this run following command on terminal to secure your mysql server. sudo mysql_secure_installation
-
Enter current password for root (enter for none): mysqlsamplepassword
-
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
-
Remove anonymous users? [Y/n] y
-
Disallow root login remotely? [Y/n] y
-
Remove test database and access to it? [Y/n] y
-
Reload privilege tables now? [Y/n] y
The original answer can be found here.[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
Leave A Comment
You must be logged in to post a comment.