Reputation: 2417
I have installed XAMPP on my ubuntu. Everything are installed in /opt/lampp
directory.
When I run localhost/phpmyadmin
, it is working fine and I can create database as well.
But when I try to setup using Navicat, it is returning me
2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")
My server is also running sudo /opt/lampp/lampp start
I have used following configuration:
Host: localhost
Port: 3306
User Name: root
Password: my_password
Can anybody please help me here.
Thank You.
Upvotes: 1
Views: 671
Reputation: 714
Use 127.0.0.1 ip address instead of localhost to connect to MySQL.
Reason: When using localhost to connect to MySQL, the operating system will use the socket connector.
If you use the 127.0.0.1 ip address, the operating system will use the TCP/IP connector.
Upvotes: 1