Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
28
rated 0 times [  28] [ 0]  / answers: 1 / hits: 110491  / 2 Years ago, sat, august 6, 2022, 5:00:18

I typed apt-get install phpmyadmin and ran into an error saying it cannot connect to mysql (socket issue). It was normal because I forget to install mysql before, so I selected "abort" above all options given by phpmyadmin.



Then sudo tasksel and installed lamp server.



Once finished, I ran :



apt-get remove --purge phpmyadmin
apt-get install phpmyadmin


Then mysql -u root -p but I got the following error: Access denied for the following user 'root'@'localhost'



So I solved this problem by doing :



mysql
SET PASSWORD FOR root@localhost=PASSWORD('mypassword');
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'mypassword' WITH GRANT OPTION;


Then I successfully logged in localhost/phpmyadmin, but found this message :



The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.



I clicked here, and it showed me :
enter image description here



Can I go on peacefully with mysql/phpmyadmin?


More From » mysql

 Answers
3

OP's answer:



I solved this problem with the following :



cd /usr/share/doc/phpmyadmin/examples
sudo gunzip create_tables.sql.gz
mysql -u root -p < create_tables.sql
mysql -u root -p -e 'GRANT SELECT, INSERT, DELETE, UPDATE ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY "pmapassword"'


Then edited /etc/phpmyadmin/config.inc.php on these lines :



/* Optional: User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapassword';


Logged back in phpmyadmin, and then, the warning message had disappeared.



Also note that you may have a new warning about phpmyadmin storage not completely configured. This can be caused because you need to tell phpmyadmin the name of the tables to use their features. That can be done editing /etc/phpmyadmin/config.inc.php on this lines:



$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';


Note the double underscore __.


[#32454] Sunday, August 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pilun

Total Points: 270
Total Questions: 100
Total Answers: 94

Location: England
Member since Sat, Feb 13, 2021
3 Years ago
;