Mysql – How to detect whether MySQL server is running as Amazon RDS

amazon-rdsMySQL

I am writing an application wherein I want to detect whether MySQL server is running as Amazon RDS instance?
Can somebody help me out how to detect it?

auto_increment_increment1
auto_increment_offset1
autocommitON
automatic_sp_privilegesON
back_log50
basedir/rdsdbbin/mysql-5.1.45.R1/
big_tablesOFF
binlog_cache_size32768
binlog_direct_non_transactional_updatesOFF
binlog_formatMIXED
bulk_insert_buffer_size8388608
character_set_clientutf8
character_set_connectionutf8
character_set_databaselatin1
character_set_filesystembinary
character_set_resultsutf8
character_set_serverlatin1
character_set_systemutf8
character_sets_dir/rdsdbbin/mysql-5.1.45.R1/share/mysql/charsets/
collation_connectionutf8_general_ci
collation_databaselatin1_swedish_ci
collation_serverlatin1_swedish_ci
completion_type0
concurrent_insert1
connect_timeout10
datadir/rdsdbdata/db/
date_format%Y-%m-%d
datetime_format%Y-%m-%d%H:%i:%s
default_week_format0
delay_key_writeON
delayed_insert_limit100
delayed_insert_timeout300
delayed_queue_size1000
div_precision_increment4
engine_condition_pushdownON
error_count0
event_schedulerOFF
expire_logs_days0
flushOFF
flush_time0
foreign_key_checksON
ft_boolean_syntax+-><()~*:""&|
ft_max_word_len84
ft_min_word_len4
ft_query_expansion_limit20
ft_stopword_file(built-in)
general_logOFF
general_log_file/rdsdbdata/log/mysql-3306.log
group_concat_max_len1024
have_community_featuresYES
have_compressYES
have_cryptYES
have_csvYES
have_dynamic_loadingYES
have_geometryYES
have_innodbYES
have_ndbclusterNO
have_opensslYES
have_partitioningYES
have_query_cacheYES
have_rtree_keysYES
have_sslYES
have_symlinkYES
hostnameip-10-28-182-30
identity0
ignore_builtin_innodbOFF
init_connect
init_file
init_slave
innodb_adaptive_hash_indexON
innodb_additional_mem_pool_size2097152
innodb_autoextend_increment8
innodb_autoinc_lock_mode1
innodb_buffer_pool_size1179648000
innodb_checksumsON
innodb_commit_concurrency0
innodb_concurrency_tickets500
innodb_data_file_pathibdata1:10M:autoextend

Best Answer

DISCLAIMER : Never used Amazon RDS

Since SELECT VERSION(); does not work, here is a suggestion:

Run SHOW GLOBAL VARIABLES; on a standard installation of MySQL and compare it with SHOW GLOBAL VARIABLES; on a Amazon RDS installation of MySQL.

It is possible that there may be AmazonRDS-specific variables in place.

Try running SHOW GLOBAL VARIABLES LIKE '%rds%'; and see if there are any variables. If you find any such variables, then that is your query to run.