The friend who installed Ubuntu on my notebook also installed LAMP. When I discovered the PHP version had no MySQL support
> Fatal error: Call to undefined function mysql_connect() in /var/www/property/admin.php on line 14
I decided to just download and install XAMPP.
Had to stop Apache and httpd starting but now things work well except.
I seem to have two mysql instances running. A PHP application gets the same instance as phpMyAdmin. So its not a disaster I can do all sql admin through phpMyAdmin. But I can't use mySQL for command line the way God intended.
I have two mySQLs, the one friend installed /usr/bin/mysql and with XAMPP /opt/lampp/bin/mysql
With XAMPP started /usr/bin/mysql gives following error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
/opt/lampp/bin/mysql connects but when I do show databases; it shows me the databases from the "discarded" mysql installation.
With XAMPP stopped /usr/bin/mysql gives same error message.
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)
Different socket in failure from xampp mysql.
Any idea how to kill my discarded instance, and make mySql connect to the correct instance?