Phpmyadmin. mysqli_real_connect(): (HY000/2002): Permission denied.

I was facing the same problem. I’m using ubuntu 20.04 using wsl. Created the lamp server with php7.3. Created new user with full privilege’s. From root & from other user, getting the same error.

Step 1 – Install Selinux:

sudo apt install policycoreutils selinux-utils selinux-basics

Step 2 – Activate:

sudo selinux-activate

Step 3 – Activate httpd_can_network_connect_db 1:

By default, the policy httpd_can_network_connect_db is disabled (meaning that your web server cannot contact a remote DB.) Check this via:

getsebool -a | grep httpd

If httpd_can_network_connect_db is Off, enable it via:

setsebool -P httpd_can_network_connect_db 1

Step 4 – Maybe need to change: change localhost to 127.0.0.1 in /etc/phpmyadmin/config.inc.php

$cfg['Servers'][$i]['host'] = '127.0.0.1';

Step 6 – Restart mysql & apache:

sudo service mysql start
sudi service apache2 start.

source : https://stackoverflow.com/questions/73502070/phpmyadmin-mysqli-real-connect-hy000-2002-permission-denied-connection-f
Posted on: August 5, 2024, by :  | 24 views
https://serang.ut.ac.id/css/css/slot88/ https://tinjut.bagkeu.dikdasmen.kemdikbud.go.id/slot-maxwin/ https://dpm.polinema.ac.id/slot-gacor/ https://akademik.ft.unm.ac.id/slot-dana/ https://ppdb.probolinggokab.go.id/slot-5000/ https://bkad.sulselprov.go.id/assets/ https://ojs.balidwipa.ac.id/docs/slot-gacor/ http://korpri.pekalongankab.go.id/api/slot-gacor/ https://elang.umpp.ac.id/foto/farmasi/-/asset/ http://rsud-kelet.jatengprov.go.id/wp-content/-/asset/ https://kusdhianto-fe.staff.ugm.ac.id/slot88/ http://ppdb.probolinggokab.go.id/judi-bola/ https://bapenda.labuhanbatukab.go.id/racikan-sbobet/ http://rsud-kelet.jatengprov.go.id/wp-content/-/data/ https://agenda.riau.go.id/-/judi-bola/ https://balapan.padang.go.id/sbobet88/ http://jdih.wakatobikab.go.id/sbobet88/ http://kph.menlhk.go.id/sbobet88/ https://bkad.sulselprov.go.id/data/ https://dpm.polinema.ac.id/slot-gacor/ https://dinkes.jemberkab.go.id/storage/attachments/