Home > TT - How To, TechTalk > Connect to XAMPP MySQL using MySQL GUI Tools

Connect to XAMPP MySQL using MySQL GUI Tools

Your Ad Here

When you’re running XAMPP, using MySQL GUI tools (Contains MySQL Administrator and MySQL Query Browser) with default options throws the following error during the establishment of connection:

MySQL Error Nr. 2002 Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock

This is because XAMPP installs all the modules of Apache, MySQL etc in /var/opt whereas the tools look for default installation directory i.e. /var/run/…

You can find the sock file of XAMPP MySQL in /opt/lampp/etc/my.cnf. The default location for XAMPP MySQL is “/opt/lampp/var/mysql/mysql.sock“. In MySQL Administrator’s “Connect to…” dialog box, press the button “Details” and enter “/opt/lampp/var/mysql/mysql.sock” without the quotes in the “Connect Using Socket File” field.

Save this instance so that you can use this configuration automatically the next time you try to connect.

Your Ad Here

Ashok TT - How To, TechTalk ,

  1. No comments yet.
  1. No trackbacks yet.