Solve phpmyadmin problem in ubuntu 18.04

1. sudo vi /usr/share/phpmyadmin/libraries/sql.lib.php
approx line 613
replace this code
((empty($analyzed_sql_results['select_expr'])) || (count($analyzed_sql_results['select_expr'] == 1) && ($analyzed_sql_results['select_expr'][0] == '*')))

with this code

((empty($analyzed_sql_results['select_expr'])) || (count($analyzed_sql_results['select_expr']) == 1) && ($analyzed_sql_results['select_expr'][0] == '*'))

2. sudo vi /usr/share/phpmyadmin/libraries/plugin_interface.lib.php
approx line 532
replace this code
$no_options = true;
if($options != null && count($options) > 0) {
foreach($options->getProperties() as $propertyMainGroup) {

with this code

$no_options = true;
if($options != null && count((array)$options) > 0) {
foreach($options->getProperties() as $propertyMainGroup) {

3. sudo systemctl restart apache2

How to Reset mysql root password without known old password For Centos and Fedora

1. service mysqld stop
2. mysqld_safe --skip-grant-tables &
3. if error comes then create mkdir -p /var/run/mysqld and then give permission chown mysql:mysql /var/run/mysqld
and then again run 2 step
4. mysql
5. UPDATE mysql.user SET authentication_string=PASSWORD("password") WHERE User='root';
6. FLUSH PRIVIlEGES;
7. quit
8. then stop mysqld_safe command
9. service mysqld start

How to Reset mysql root password without known old password For Debian and Ubuntu

1. service mysql stop
2. mysqld_safe --skip-grant-tables &
3. if error comes then create mkdir -p /var/run/mysqld and then give permission chown mysql:mysql /var/run/mysqld
and then again run 2 step
4. mysql
5. UPDATE mysql.user SET authentication_string=PASSWORD("password") WHERE User='root';
6. FLUSH PRIVIlEGES;
7. quit
8. then stop mysqld_safe command
9. service mysql start