MySQL - installed version 5.5 but mysql --version says 5.0.95 I'm running CentOS 5.2 and upgraded MySQL to 5.5. When I run mysql I get this:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.5.45 MySQL Community Server (GPL)


But when I run mysql --version I get this:

mysql  Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using readline 5.1


Since the mysqld is mysql55-mysqld I'm sure I'm running 5.5, but why am I getting the wrong version with the version command?
This problem may happen if you have multi MySQL instances on the same machine. There was pre-installed MySQL when the OS was installed, or using auto installation methods like yum: in this case when you type mysql it will point to the pre-installed one since the environment variable point there. you can test it by going to /mysql/install/path/bin use ./mysql --version this should show you the exact version of MySQL.