• Welcome to Web Hosting Community Forum for Webmasters - Web hosting Forum.
 

Recommended Providers

Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress Theme

Divi WordPress Theme
WPZOOM

Forum Membership

Forum Membership

Easy way to check PHP and MySQL version via SSH

Started by Rick, May 01, 2015, 04:50:18 PM



Rick

Hi,

I am new to manage server via SSH. Is it possible to check PHP and MySQL version via SSH for cPanel server? I know we can upload phpifo page to check PHP version but I am curious if we can check it directly via SSH.

Thanks,
Rick

Kailash

You can execute following commands via SSH to check PHP and MySQL version via SSH:

php -v
mysql -V


hmb-willem


neckozenica

Below are the command to check the MySQL version you are using on your Linux server / machine through shell via SSH:

SSH Command: mysql -V

Process:
Open SSH Shell
Login to your server
Enter mysql -V command
You'll receive output in SHELL something like
mysql Ver 14.14 Distrib 5.5.50, for Linux (x86_64) using readline 5.1
NOTE: Type above command carefully and exactly like "mysql -V" without quotes. If by mistake you typed "mysql -v" (without capital v) instead of "mysql -V" you'll see "Welcome to the MySQL monitor".

kumkum

Its very easy to check MySQL version via SSH, you just have to enter below command for it.
MySQL -V

You can check description for this here.

For PHP version you can run below command:
php -v

etechsupport

Hi, IF you are looking for something on cPanel then you can visit our website.

eTechSupport provide service like:-

Web Hosting Support
Cloud Infra Management
Virtualization Support
24×7 Server Management (cPanel, Plesk, DirectAdmin)
24×7 Server Monitoring
Server Migration as a Service
Backups as a Service
Dedicated L1, L2, L3 Staffing
Technical Support -eTechSupport.net sales@etechsupp

Akshay_M

You can easily check the PHP and MySQL versions via SSH (Secure Shell) by using the following commands:

Check PHP Version:

To check the PHP version installed on your server, use the following command:

bash
Copy code
php -v
This command will display the PHP version along with other information about the PHP configuration.

Check MySQL Version:

To check the MySQL version installed on your server, use the following command:

bash
Copy code
mysql --version
This command will display the MySQL client version.

Alternatively, you can use the mysql command to log in to the MySQL server and check the server version. Here's how:

bash
Copy code
mysql -u your_username -p
Replace your_username with your MySQL username. You'll be prompted to enter your MySQL password. After successfully logging in, you can check the server version using the following SQL query:

sql
Copy code
SELECT VERSION();
This query will display the MySQL server version.

By running these commands, you can quickly determine the PHP and MySQL versions installed on your server through SSH.