MySQL version

MySQL version

Posted by: harikaried
Posted on: 2005-04-01 23:02:00

Just making sure I'm reading this correctly..

> mysql -V
mysql Ver 14.7 Distrib 4.1.8, for pc-linux (i386)

" If you specify the ON DUPLICATE KEY UPDATE clause (new in MySQL 4.1.0)"
http://dev.mysql.com/doc/mysql/en/insert.html

So that should work on this version of MySQL.. ?

"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON DUPLICATE KEY UPDATE..."

Re: MySQL version

Posted by: psross
Posted on: 2005-04-02 03:21:00

DreamHost is currently using MySQL server 4.0.23.

mysql -V gives the version of the MySQL client which is currently 4.1.8 on the DreamHost servers. To get the server version, you have to connect to your server:

$ mysql -h<hostname> -u<username> -p <database>

It will print out something like:

Your MySQL connection id is 56907 to server version: 4.0.23a-log

Re: MySQL version

Posted by: ardco
Posted on: 2005-04-02 16:39:00

Thanks for that. I gave some bad info here a while back, here:
http://discussion.dreamhost.com/showflat.pl?Cat=&Board=curious&Number=17370
which I'll go correct now.

Mine shows .20 versus .23a...

"Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 15247 to server version: 4.0.20-log"

Here's another similar way:

mysql> status

Tags: mysql versionreading