XAMPP plus MySQL Administrator

Problems with the Linux version of XAMPP, questions, comments, and anything related.

XAMPP plus MySQL Administrator

Postby akisame » 09. February 2008 13:09

Hello forum,

I have just installed XAMPP on my Ubuntu 7.10 box. I have problems with connecting to example databases/tables in the XAMPP instance via MySQL Administrator (which I have also just installed). I haven't changed anything in the XAMPP settings. What settings are required for MySQL admin to connect to the MySQL dbs created by XAMPP? I can see them via phpMyAdmin, so this cannot be an installation failure.

Conditions:
When Connect to MySQL Server Instance window was brought up,
I typed Server Hostname = localhost.
For Username field, I tried all relevant rows I could find in USER table under database MYSQL (as I said above, I can see tables via phpMyAdmin).
Password field is left blank since no pws are set.

Symptoms:
For all combinations of values, the following message is returned:

Code: Select all
Could not connect to host 'localhost'.
MySQL Error Nr. 2002
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Click the 'Ping' button to see if there is a networking problem.


I am prompted to ping the localhost server. The responses I get is endless rows of something like this:
Code: Select all
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.056 ms


Thank you verrrry much in advance. :)
akisame
 
Posts: 4
Joined: 09. February 2008 12:27

Second Report

Postby akisame » 10. February 2008 16:33

Hello,

In fact I have a very similar problem with this thread. The only difference is that phpMyAdmin can connect to databases in my installation.

It is rather unnerving to find that no solution has been found for the year-old thread. :cry:
akisame
 
Posts: 4
Joined: 09. February 2008 12:27

Postby comfixit » 11. February 2008 02:37

I had this same problem when trying to access with MySQL Administrator.

To fix the problem I had to use: Localhost instead of localhost

Worked like a charm.
comfixit
 
Posts: 1
Joined: 11. February 2008 02:33

Postby akisame » 14. February 2008 01:00

comfixit wrote:I had this same problem when trying to access with MySQL Administrator.

To fix the problem I had to use: Localhost instead of localhost

Worked like a charm.


Thank you comfixit but it just results in a slightly different error.
Code: Select all
Could not connect to host 'Localhost'.
MySQL Error Nr. 2003
Can't connect to MySQL server on 'Localhost' (111)

As you can see the application stops mentioning the "socket '/var/run/mysqld/mysqld.sock' (2)" whatever that is.

Actually there is no such thing as /var/run/mysqld/mysqld.sock in my PC. The directory /mysqld/ does not exist. Why does MySQL Administrator assume a priori that such a thing exists??
akisame
 
Posts: 4
Joined: 09. February 2008 12:27

Postby Scory » 14. February 2008 12:05

>The directory /mysqld/ does not exist

Create it!

>The directory /mysqld/ does not exist. Why does MySQL Administrator assume a priori that such a thing exists??

Why do you assume a priori that much to your heart? The socks file is the main file for exchanging date between mysqld and the clients (if you dont use TCPIP Ports).

The definition of the socket file is part of the my.cnf Configuration file of MySQL. You may change that to your needs, but /var/run/mysqld/mysqld.sock is a default configuration and its ok. If your file system is missing a folder /var/run/mysqld, simply create it.
Scory
 

Postby akisame » 15. February 2008 14:44

>The directory /mysqld/ does not exist

Create it!

Created the directory manually but no improvement.
The definition of the socket file is part of the my.cnf Configuration file of MySQL. You may change that to your needs, but /var/run/mysqld/mysqld.sock is a default configuration and its ok.

Thank you for mentioning the my.cnf, which otherwise I was not aware of. I could locate one in /etc/mysql and the sock file pointed at in the cnf file was indeed
/var/run/mysqld/mysqld.sock. This was not okay because all files pertaining to MySQL server are under /opt/lampp. I found another my.cnf file in /opt/lampp/etc and copied it under /etc/mysql. I am glad that MySQL Admin can view the XAMPP databases.

However, MySQL Query Browser still cannot find the proper sock file. Anyone can tell which .cnf file it refers to when connecting to DBs?
akisame
 
Posts: 4
Joined: 09. February 2008 12:27

XAMPP for Linux

Postby fdegir » 17. March 2008 17:03

Hi,

There should be some place to change configuration for mysql-query-browser. But here is a quick fix.

Create /var/run/mysqld directory
Create soft link for mysql.sock from xampp directory

$ sudo ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock

This works fine, But I am not sure if this works or not when you restart your system.

Cheers.
fdegir
 
Posts: 1
Joined: 17. March 2008 16:53

Postby sari42 » 17. March 2008 17:19

you could also change the setting in /opt/lampp/etc/my.cnf (which XAMPP uses)
from
socket = /opt/lampp/var/mysql/mysql.sock
to
socket = /var/run/mysqld/mysqld.sock

which is what MySQL Administrator seems to expect.
(create that folder with proper rights/ownership)
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Re: XAMPP plus MySQL Administrator

Postby mtnakd » 26. May 2009 22:36

I am an Ubuntu user on a 2.6.24.24 kernel. the thing i was planning to do is making communicate Xammp and mysql-server-5.0 together on my machine. after a mess up, first re-installed mysql-server-5.0 by simply typing
Code: Select all
apt-get install mysql-server-5.0
.

After that, when i started mysql server wit
Code: Select all
/etc/init.d/mysql start
i got an error saying that 'debian-sys-maint' cannot login without password using 'no', so then i login to mysql as root and then navigated to 'mysql' table and typed
Code: Select all
grant all privileges on *.* to 'debian-sys-maint'@'localhost' identified by '<password>' with grant option;
and then
Code: Select all
flush privileges;

After all, i went through /opt/lampp/etc directory and edited 'my.cnf' file ; changed socket values:
Code: Select all
socket = /opt/lampp/var/mysql/mysql.sock
to
Code: Select all
socket = /var/run/mysqld/mysqld.sock


After restarting mysql server from /etc/init.d/mysql start, i get a warning that says :
Checking for corrupt, not cleanly closed and upgrade needing tables.
and i uncommented
Code: Select all
skip-innnodb
line. Although, i get the same error again,they all work well now.

Now, i can connect to mysql server with Netbeans through my projects.
Hope, this helps you all.
mtnakd
 
Posts: 1
Joined: 26. May 2009 21:05


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests