Home > database, mysql, PHP, SQL, tricks > How do I find out what version of MySQL I am running?

How do I find out what version of MySQL I am running?

Use the command:
mysql>select version();
+———–+
| version() |
+———–+
| 5.0.45 |
+———–+
1 row in set (0.00 sec)

Golden question:
Why I went for mysql version?
I was suppose to give ‘TRUNCATE’ privilege to a table that time i found one fact. i.e. there is not any TRUNCATE privilege :)
“The DROP privilege enables you to drop (remove) existing databases, tables, and views. Beginning with MySQL 5.1.10, the DROP privilege is also required in order to use the statement ALTER TABLE … DROP PARTITION on a partitioned table. Beginning with MySQL 5.1.16, the DROP privilege is required for TRUNCATE TABLE (before that, TRUNCATE TABLE requires the DELETE privilege).”

Categories: database, mysql, PHP, SQL, tricks
  1. Betty W. Kirk
    February 27, 2012 at 4:19 am | #1

    I Betty W. Kirk I am a New User of A computer Can You Help Me get threw the question that SQL has wrote to me thanks Betty W. Kirk

    • preetul
      February 27, 2012 at 4:40 am | #2

      go ahead…

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.