php, phpmyadmin on mariadb not working on ubuntu

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarInder Singh Thakur
  • 21 Mar, 2017
  • 0 Comments
  • 1 Min Read

php, phpmyadmin on mariadb not working on ubuntu

Ever since Ubuntu upgraded to 16.04 with php 7 setting up LAMP server is not very difficult but getting it up is sometimes troublesome. specially running php7 because running php7 on apache also need to install mbstring and libapache2-mod-php you can use following commands on terminal to install these packages and within in no moment you will have your php working.
sudo apt install php libapache2-mod-php

sudo apt install php7.0-mbstring

Another problem that I encountered  us configuring it using mariadb as a database server. In maria db password for root is not set by default and you need to do it manually you can follow following instructions to get your mariadb working with phpmyadmin

Follow the steps below.

  1. Start the MySQL server with the --skip-grant-tables option
    $ mysqld --skip-grant-tables
  2. Execute these statements.
    $ mysql -u root mysql
    $mysql> UPDATE user SET Password=PASSWORD('password') where USER='root';
    $mysql> FLUSH PRIVILEGES;
    

If case you face the unknown field Password error :

update user set authentication_string=password('my_password') where user='root';
  1. Finally, restart the instance/daemon without the --skip-grant-tables option.
    $ /etc/init.d/mysql restart
    

You should now be able to connect with your new password.

$ mysql -u root -p




To install phpmyadmin use this command and follow onscreen instructions.
sudo apt install phpmyadmin

Leave a Reply

Your email address will not be published. Required fields are marked *

X