How to get protocol, characterset, mysql info?

 
Thread Tools Search this Thread
Top Forums Web Development MySQL DevZone RSS How to get protocol, characterset, mysql info?
# 1  
Old 02-25-2010
How to get protocol, characterset, mysql info?

Hi,

I know the API to get protocol version, character set etc. If I want to find out the current protocol version, current user character set, mysql info, mysql server info wihtout using these API -
mysql_get_server_info()
mysql_info()
mysql_get_proto_info()
mysql_character_set_name()
mysql_get_client_info().

Is there any other way to get these information without using API?

I don't want to use API instead Shall I get these information from Infomrmation_schema?

Can I fetch these information directly accessing enviornment variable if possible?

---------- Post updated 02-25-10 at 12:53 AM ---------- Previous update was 02-24-10 at 11:49 PM ----------

I find out the value of protocol, version, character set, host name using

select @@hostname
select @@version
select @@protocol_version
select @@character_server_set.

But couldn't find out the how to get values of

mysql_get_client_info()
mysql_info()
mysql_stat()
mysql_thread_safe()
without using it in the same manner used for protocol,character set etc.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Characterset conversion problem using iconv command

Hi Friends, I am not able to conver character set from UTF-8 to IBM-284 throwing an error "cannot open convertor" . Could you please help me how to get out of this error. Below command is working fine iconv -f ISO8859-15 -t UTF-8 fromfile.txt > tofile.txt But the below command is... (2 Replies)
Discussion started by: sivakumarl
2 Replies

2. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

3. Shell Programming and Scripting

decimal value for particular characterset

Hi, I need some help to get decimal value of some particluar character set for e.g. in windows-1251 characterset ж --> 230 Please help and suggest way to achive same. (7 Replies)
Discussion started by: peeyushgehlot
7 Replies

4. UNIX for Advanced & Expert Users

mysql would not start: missing mysql.sock

I recently installed mysql-standard-5.0.21-solaris9-sparc-64bit.pkg on a Solaris 9 machine (SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-250). The package installation went very smooth, however, starting mysql is a different story. I get the message below everytime I try to start mysql: #... (2 Replies)
Discussion started by: xnightcrawl
2 Replies

5. UNIX for Advanced & Expert Users

MySQL problem >> missing mysql.sock

MySQL on my server is down.... I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock Any suggestions? Here's what I can't do: can't be root don't have physical access (do stuff via SSH) reinstall MySQL (need to keep the current MySQL... (8 Replies)
Discussion started by: _hp_
8 Replies
Login or Register to Ask a Question
MYSQL(1)						      General Commands Manual							  MYSQL(1)

NAME
mysql - text-based client for mysqld, a SQL-based relational database daemon SYNOPSIS
mysql [-B|--batch] [-#|--debug= logfile] [-T|--debug-info] [-e|--exec= command] [-f|--force] [-?|--help] [-h|--host= hostname] [-n|--unbuffered] [-p[pwd]] [--password=[pwd]] [-P|--port= pnum] [-q|--quick] [-r|--raw] [-s|--silent] [-S|--socket= snum] [-u|--user= uname] [-v|--verbose] [-V|--version] [-w|--wait] DESCRIPTION
The mysql program provides a curses-based interface to the SQL-based database server daemon, mysqld(1). Full fuller documentation, refer to the HTML documents installed with the package. OPTIONS
-B|--batch Print results with a tab as separator, each row on a new line. -#|--debug=logfile Employ the specified debug log. -T|--debug-info Print debug information upon exiting. -e | --exec=command Execute the specified command and quit (--batch is implicit). -f|--force Continue even if the face of a SQL error. -?|--help Display a help message and exit. -h|--host=hostname Connect to the specified host. -n|--unbuffered Flush the buffer after each query. -p|--password[=pwd] Employ the specified password when connecting to the database server. If a password is not supplied, it will be requested interac- tively. -P|--port=pnum Employ the specified port number for connecting to the database server. -q|--quick Do not cache the result; print it row by row. This may slow down the server if the output is suspended. -r|--raw Write fields without conversion. (used with --batch). -s|--silent Silent mode: reduce the amount of output. -S|--socket=snum Employ the specified socket file for connecting to the database server. -u|--user=uname Employ the specified user name for logging in to the server. -v|--verbose Verbose mode: write more Specifying this option twice produces a tabular output format. -V|--version Print the mysql version number and exit. -w|--wait Wait and retry if the database server connection is down. FILES
/depot/bin/mysql executable /depot/bin/mysqld executable /depot/bin/safe_mysqld executable shell script for starting mysqld safely /site/var/mysql/data location of database files EXAMPLE
You can also read a backup dump file back into MySQL with: mysql database < backup-file.sql SEE ALSO
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1), mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1), msql2mysql (1), perror (1), replace (1), safe_mysqld (1), which1 (1), zap (1), AUTHOR
Ver 6.3, distribution 3.20.20 Michael (Monty) Widenius (monty@tcx.se), TCX Datakonsult AB (http://www.tcx.se). This software comes with no warranty. Manual page by R. P. C. Rodgers, Lister Hill National Center for Biomedical Communication, U.S. National Library of Medicine (rodgers@nlm.nih.gov). 13 June 1997 MYSQL(1)