LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   MySQL (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-821794/)

moiseszaragoza 07-23-2010 09:05 PM

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

TB0ne 07-23-2010 09:41 PM

Quote:

Originally Posted by moiseszaragoza (Post 4043557)
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"...

Wim Sturkenboom 07-24-2010 02:26 AM

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.

Wim Sturkenboom 07-24-2010 02:38 AM

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.


chrism01 07-25-2010 02:37 AM

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

Code:

rpm -qa |grep -i mysql


All times are GMT -5. The time now is 08:02 AM.