Comments on Allow Your Applications To Access The XAMPP MySQL Server Directly

Allow Your Applications To Access The XAMPP MySQL Server Directly If you want to have a full featured "LAMP" server with one step you can use "XAMPP", it's easy and fast but you can't access its MySQL database server using the regular "mysql" client (/usr/bin/mysql), you have to use its own client (/opt/lampp/bin/mysql) to do that.

3 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Maciek

Edit your my.cnf file (typically /etc/my.cnf or /etc/mysql/my.cnf) and add the following section or modify the existing one:

[client]
socket=/opt/lampp/var/mysql/mysql.sock

It should make the standard /usr/bin/mysql binary to locate and use the proper socket file.

By:

Thank you for your help, I didn't know that before

in my machine I found the file in "/etc/my.cnf" and the socket was under "[mysqld]" part like this "socket=/var/lib/mysql/mysql.sock"

By: gm

Hi, I do mv on /usr/bin/msql to /usr/bin/mysql.orginal and i need to revert it reversing the process but it doesn't work. what will i do? Anyway, i have web (Centos 5.5) and database server (fedora 5) running on different machine in LAN, i wanted to connect the php scripts located in /var/www/html to mysql running in xammp linux "/opt/lampp/" but no query took placed. However, i can connect to the mysql from my web server using (mysql -u "username" -h "IP address on database" -p). What is problem on this. Please help gm