LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2010, 10:05 PM   #1
moiseszaragoza
Member
 
Registered: Jul 2010
Posts: 37

Rep: Reputation: 15
MySQL


how can i find out what version of MySQL i have on my box?

i know if i run phpinfo() it says 5.0.77 but how can i find out what it is inside centos 5?

Thanks for the help
 
Old 07-23-2010, 10:41 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,349

Rep: Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910
Quote:
Originally Posted by moiseszaragoza View Post
how can i find out what version of MySQL i have on my box?

i know if i run phpinfo() it says 5.0.77 but how can i find out what it is inside centos 5?

Thanks for the help
If you type in "man mysql" it'll give you the options for that command. Try "mysql -v" or "mysql --version"...
 
Old 07-24-2010, 03:26 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Client or server? From your question, sounds like the server (because that is what phpinfo() returns).

From a client connected to the server, you can run the query select version();.

Else a possibility would be to do a locate (possibly after an update db), use your package manager (no real experience with yum or rpm so something to research yourself) and maybe which.

Note that the server is mysqld, not mysql.

PS No system with mysql/mysqld at hand, so I'm not sure what TB0ne's commands will return. I assume it's the version of mysql, not mysqld.

Last edited by Wim Sturkenboom; 07-24-2010 at 03:35 AM. Reason: modified PS
 
Old 07-24-2010, 03:38 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Ah, got it for mysqld

Read the man page e.g. http://www.manpagez.com/man/1/mysqld/

Code:
--version, -V
          Display version information and exit.
 
Old 07-25-2010, 03:37 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
If you want to check the versions of all the *mysql* named pkgs:

Code:
rpm -qa |grep -i mysql
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 03:21 PM
yum install php-mysql fails with mysql 5.1 - "Error: mysql conflicts with MySQL" rebelde Linux - Software 2 03-13-2009 11:32 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 04:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM


All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration