using lampp or xampp cannot connect to Mysql how to solve

If you install lampp server, run mysql first

Then make “mysqld” directory in /var/run

Link your mysql from lampp to /var/run/mysqld