Two instances of SqlServer, I think

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

Two instances of SqlServer, I think

Postby francisc » 19. November 2009 13:20

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.
/opt/lampp/bin/mysql gives:
> 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?
francisc
 
Posts: 1
Joined: 19. November 2009 13:12

Re: Two instances of SqlServer, I think

Postby ThaGoob » 24. November 2009 20:15

Just a guess, but you said you're using Ubuntu:
Ubuntu has a packet manager, so you could try to remove the mysql server installed by system (e.g. "apt-get remove mysql-server"). Your problem is that XAMPP brings its own mysql server daemon, which is now in a state of hugging and slamming the Ubuntu one with quite unpredictable effets.
But do this (removing the system-near mysql server of Ubuntu) at your own risk, 'cause I'm not quite famliliar with that OS.

Alternatively, you could try to install mysql support for your PHP by issuing the command "apt-get install php5-mysql" (which is what I would try first). So you could use the PHP-MYSQL-Apache-Stack installed first-hand.

Greetz,

Goob
ThaGoob
 
Posts: 3
Joined: 19. January 2004 17:16


Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 8 guests