How do I check if MySQL is working?

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

How do I check if MySQL is working?

Postby pronto » 21. May 2007 23:12

I'm still learning how to use WAMP in a course. So I don't really know what needs to be done the LAMP way? Since XAMPP is kind of set in stone regarding certain behaviours I know even less what to do in order to make it work in Linux?

In the course I just follow instructions how to install MySQL then the part where you test the Database with Windows CMD you're supposed to check these things.

To see if the server is running.
Code: Select all
c:\> mysqladmin -u root -p ping


To print out the version number for MySQL server.
Code: Select all
c:\> mysqladmin -u root -p version


To check how long the server has been online.
Code: Select all
c:\> mysqladmin -u root -p status


None of those simple commands seem to work with XAMPP on Linux
Code: Select all
mike@sanka:~$ mysqladmin -u root -p ping
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
mike@sanka:~$


What am I doing wrong?
The password is supposed to be empty it says on the webpage but still it won't work?
pronto
 
Posts: 5
Joined: 22. April 2007 09:23

Postby Dave_L » 22. May 2007 02:47

Did you start the mysql daemon?

Starts mysql:
# /opt/lampp/lampp startmysql

or

Starts apache, mysql, etc.:
# /opt/lampp/lampp start
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby Wiedmann » 22. May 2007 03:22

mike@sanka:~$ mysqladmin -u root -p ping

With this command you are using the MySQL client tool from your system, and not that one from XAMPP...

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

... and the tool from your system search for the socket at the wrong location.

If you have a XAMPP, you should use the XAMPP tools:
Code: Select all
/opt/lampp/bin/mysqladmin -u root -p ping
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby pronto » 22. May 2007 10:24

Tnx for your help guys. But I decided from frustration last night to uninstall XAMPP and install the real LAMP on Ubuntu Desktop instead. It was much easier and quicker to my suprise :D

My install time for each:

WAMP = ~15 min
XAMPP = ~5 min
LAMP the aptitude way = ~5 sec

Configuration time for each is another matter:
:)

I'm going back to Ubuntu now, XAMPP served it's purpose the 3 weeks I was struggling learning basic PHP. Now I want easier configuration control so LAMP was the sanest choice after all. Bye, and good luck XAMPP community!
pronto
 
Posts: 5
Joined: 22. April 2007 09:23


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests