5

For the last 6 hours I have been trying to install MariaDB on my Raspberry Pi Zero. I am using the latest Raspbian Stretch. The problem is that the configuration menu for MariaDB doesn't show up during installation (which I believe it should) and it doesn't ask me to set the root password. After installation I cannot login to the MariaDB server with mysql using any credentials, but if I run mysql with root priviliges (sudo mysql) it lets me in without any form of authentication. I tried running mysql_secure_installation after install, but it didn't help. By the way I am trying to install phpMyAdmin.

EDIT: I ended up using Raspbian Jessie, and the configuration dialog popped up as it should, and I could configure the password, and everything worked perfectly fine.

I am (and probably others too) still looking for a solution to this though. I also noticed that on Stretch the debian-sys-maint user wasn't created either, and /etc/mysql/debian.cnf was containing a bad login (user root with no pass).

Soma Zambelly
  • 153
  • 1
  • 1
  • 5

2 Answers2

7

I am running Apache, PHP, MyAdmin and MariaDB on a fresh install of Raspbian Stretch Lite using this sequence, and it works perfectly.

  1. Update

    sudo apt-get update && sudo apt-get upgrade

  2. install mariadb server and client

    sudo apt-get install mariadb-server mariadb-client

  3. install apache and php

    sudo apt-get install apache2 php5 libapache2-mod-php5

  4. install phpmyadmin

    sudo apt-get install phpmyadmin

  5. fix the msqli missing extension

    sudo apt-get install php5-mysqlnd

  6. setup password and secure setup

    sudo mysql_secure_installation

Finished, reboot.

Now if you still get a login/password error then you need to disable Mysql from trying to authenticate root using plugin, and not password.

sudo mysql -u root

[mysql] use mysql;
[mysql] update user set plugin='' where User='root';
[mysql] flush privileges;
[mysql] \q
Dr.Rabbit
  • 1,016
  • 6
  • 10
0

I just got my Raspberry Pi 3 and I've had problems running phpMyAdmin. I've started from scratch a couple of times, and this time I got it finally running. I did the usual steps as suggested by Dr. Rabbit above.

Then, I edited Apache 2's configuration file: sudo nano /etc/apache2/apache2.conf

And included a line: /etc/phpmyadmin/apache.conf

And finally reloaded the web server: sudo /etc/init.d/apache2 reload

I'm a complete Linux noob, and this was absolute trial and error, but it seems to be working. Strangely.. I got the idea for this from Ubuntu guides (e.g. https://help.ubuntu.com/community/phpMyAdmin )