Nathing
分类: Mysql/postgreSQL
2009-08-23 11:48:34
mysql> show variables like 'port'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 3306 | +---------------+-------+ 1 row in set (0.00 sec) mysql>
3306 是默认端口。
二:四种查看版本的方法1:在终端下:mysql -V。
以下是代码片段:
[shengting@login ~]$ mysql -V
mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)2:在mysql中:mysql> status;
以下是代码片段:
mysql> status;
--------------
mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)Connection id: 416
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 3.23.56-log
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /tmp/mysql_3311.sock
Uptime: 62 days 21 hours 21 min 57 secThreads: 1 Questions: 584402560 Slow queries: 424 Opens: 59664208 Flush tables: 1 Open tables: 64 Queries per second avg: 107.551
3:在help里面查找
以下是代码片段:
[shengting@login ~]$ mysql --help | grep Distrib
mysql Ver 14.7 Distrib 4.1.10a, for redhat-linux-gnu (i686)4:使用mysql的函数
以下是代码片段:
mysql> select version();
+-------------+
| version() |
+-------------+
| 3.23.56-log |
+-------------+
1 row in set (0.00 sec)[root@localhost classes]# rpm -ql mysql
/etc/ld.so.conf.d/mysql-i386.conf
/etc/my.cnf
/usr/bin/msql2mysql
/usr/bin/mysql
/usr/bin/mysql_config
/usr/bin/mysql_find_rows
/usr/bin/mysql_tableinfo
/usr/bin/mysql_waitpid
/usr/bin/mysqlaccess
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqldumpslow
/usr/bin/mysqlimport
/usr/bin/mysqlshow
/usr/lib/mysql
/usr/lib/mysql/libmysqlclient.so.14
/usr/lib/mysql/libmysqlclient.so.14.0.0
/usr/lib/mysql/libmysqlclient_r.so.14
/usr/lib/mysql/libmysqlclient_r.so.14.0.0
/usr/lib/mysql/mysql_config
/usr/lib/mysql/mysqlbug
/usr/share/doc/mysql-4.1.7
/usr/share/doc/mysql-4.1.7/COPYING
/usr/share/doc/mysql-4.1.7/README
/usr/share/doc/mysql-4.1.7/manual.txt.bz2
/usr/share/doc/mysql-4.1.7/mysqld_error.txt
/usr/share/info/mysql.info.gz
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysqlaccess.1.gz
/usr/share/man/man1/mysqladmin.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqlshow.1.gz
/usr/share/mysql
/usr/share/mysql/charsets
/usr/share/mysql/charsets/Index.xml
/usr/share/mysql/charsets/README
/usr/share/mysql/charsets/armscii8.xml
/usr/share/mysql/charsets/ascii.xml
/usr/share/mysql/charsets/cp1250.xml
/usr/share/mysql/charsets/cp1251.xml
/usr/share/mysql/charsets/cp1256.xml
/usr/share/mysql/charsets/cp1257.xml
/usr/share/mysql/charsets/cp850.xml
/usr/share/mysql/charsets/cp852.xml
/usr/share/mysql/charsets/cp866.xml
/usr/share/mysql/charsets/dec8.xml
/usr/share/mysql/charsets/geostd8.xml
/usr/share/mysql/charsets/greek.xml
/usr/share/mysql/charsets/hebrew.xml
/usr/share/mysql/charsets/hp8.xml
/usr/share/mysql/charsets/keybcs2.xml
/usr/share/mysql/charsets/koi8r.xml
/usr/share/mysql/charsets/koi8u.xml
/usr/share/mysql/charsets/latin1.xml
/usr/share/mysql/charsets/latin2.xml
/usr/share/mysql/charsets/latin5.xml
/usr/share/mysql/charsets/latin7.xml
/usr/share/mysql/charsets/macce.xml
/usr/share/mysql/charsets/macroman.xml
/usr/share/mysql/charsets/swe7.xml
/usr/share/mysql/czech
/usr/share/mysql/czech/errmsg.sys
/usr/share/mysql/czech/errmsg.txt
/usr/share/mysql/danish
/usr/share/mysql/danish/errmsg.sys
/usr/share/mysql/danish/errmsg.txt
/usr/share/mysql/dutch
/usr/share/mysql/dutch/errmsg.sys
/usr/share/mysql/dutch/errmsg.txt
/usr/share/mysql/english
/usr/share/mysql/english/errmsg.sys
/usr/share/mysql/english/errmsg.txt
/usr/share/mysql/estonian
/usr/share/mysql/estonian/errmsg.sys
/usr/share/mysql/estonian/errmsg.txt
/usr/share/mysql/french
/usr/share/mysql/french/errmsg.sys
/usr/share/mysql/french/errmsg.txt
/usr/share/mysql/german
/usr/share/mysql/german/errmsg.sys
/usr/share/mysql/german/errmsg.txt
/usr/share/mysql/greek
/usr/share/mysql/greek/errmsg.sys
/usr/share/mysql/greek/errmsg.txt
/usr/share/mysql/hungarian
/usr/share/mysql/hungarian/errmsg.sys
/usr/share/mysql/hungarian/errmsg.txt
/usr/share/mysql/italian
/usr/share/mysql/italian/errmsg.sys
/usr/share/mysql/italian/errmsg.txt
/usr/share/mysql/japanese
/usr/share/mysql/japanese/errmsg.sys
/usr/share/mysql/japanese/errmsg.txt
/usr/share/mysql/korean
/usr/share/mysql/korean/errmsg.sys
/usr/share/mysql/korean/errmsg.txt
/usr/share/mysql/norwegian
/usr/share/mysql/norwegian-ny
/usr/share/mysql/norwegian-ny/errmsg.sys
/usr/share/mysql/norwegian-ny/errmsg.txt
/usr/share/mysql/norwegian/errmsg.sys
/usr/share/mysql/norwegian/errmsg.txt
/usr/share/mysql/polish
/usr/share/mysql/polish/errmsg.sys
/usr/share/mysql/polish/errmsg.txt
/usr/share/mysql/portuguese
/usr/share/mysql/portuguese/errmsg.sys
/usr/share/mysql/portuguese/errmsg.txt
/usr/share/mysql/romanian
/usr/share/mysql/romanian/errmsg.sys
/usr/share/mysql/romanian/errmsg.txt
/usr/share/mysql/russian
/usr/share/mysql/russian/errmsg.sys
/usr/share/mysql/russian/errmsg.txt
/usr/share/mysql/serbian
/usr/share/mysql/serbian/errmsg.sys
/usr/share/mysql/serbian/errmsg.txt
/usr/share/mysql/slovak
/usr/share/mysql/slovak/errmsg.sys
/usr/share/mysql/slovak/errmsg.txt
/usr/share/mysql/spanish
/usr/share/mysql/spanish/errmsg.sys
/usr/share/mysql/spanish/errmsg.txt
/usr/share/mysql/swedish
/usr/share/mysql/swedish/errmsg.sys
/usr/share/mysql/swedish/errmsg.txt
/usr/share/mysql/ukrainian
/usr/share/mysql/ukrainian/errmsg.sys
/usr/share/mysql/ukrainian/errmsg.txt
[root@localhost classes]# rpm -qi mysql
Name : mysql Relocations: (not relocatable)
Version : 4.1.7 Vendor: Red Hat, Inc.
Release : 4.RHEL4.1 Build Date: 2004年11月24日 星期三 12时41分06秒
Install Date: 2009年03月30日 星期一 17时41分49秒 Build Host: tweety.build.redhat.com
Group : 应用程序/数据库 Source RPM: mysql-4.1.7-4.RHEL4.1.src.rpm
Size : 5696466 License: GPL
Signature : DSA/SHA1, 2005年01月06日 星期四 05时15分49秒, Key ID 219180cddb42a60e
Packager : Red Hat, Inc. <>
URL :
Summary : MySQL 客户程序和共享库。
Description :
MySQL 是一个多用户、多线索的 SQL 数据库服务器。
MySQL 是一个客户/服务器实现,它有一个服务器守
护进程 (mysqld) 和许多不同的客户程序和库组成。
该软件包包括 MySQL 客户程序、客户共享库、以及
通用 MySQL 文件。mysql jar包:
文件: mysql-connector-java-5.0.4-bin.jar.zip 大小: 484KB 下载: 下载 去掉.zip方可使用,即:mysql-connector-java-5.0.4-bin.jar
文件: mysql-connector-java-3.1.6-bin.zip 大小: 382KB 下载: 下载 如果不能用,改名为mysql-connector-java-3.1.6-bin.jar