|
|
麻烦翻译一下,下面这段文章:xhan
0 U: U& U" h5 k# y1 J+ K; F3 F' x/ P2 Y7 @" r" o+ N
- / V4 I/ C; R# W. e6 B- W
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
: I% L6 `9 ]5 K' T% o$ g$ i: D% A: i - 9 S" M: `$ x' f6 l/ ?8 u7 t
- ### What we need ###
+ v6 N+ T( p F - Naturally, we will need a MySQL server to store the data for us, this document * |; _7 e* F# M Z: }
- will not explain how this can be done - there are documents out there for the
% x+ ]3 R6 i- |+ Y- a - interested. The requirements include a (empty) database for TeamSpeak to use3 C( N/ `! ?$ S4 j2 \ A
- and a user account (username + password) that has the permissions to do stuff
. W( I! J# Y7 {+ r - with the database. Additionally, you will need a vendor library installed on the
1 p7 T3 H. u. N4 V- L - local machine, this came with my MySQL install.
) _$ [% I* U G b - These instructions will not tell you how you might transfer your data from the7 i) R7 R& `) \4 q) v- r2 d
- SQLite database to the MySQL database, we start with a clean and empty MySQL; S" J% D% |3 v- o. [
- database.
; n% F; q1 Y$ ^ G5 P - Some users have reported ways to import a SQLite database into MySQL, but at% b q) \! b4 {( ]
- the time of writing, there are still too many issues - check the current status: H# w3 s. S; s) P+ _7 M6 q
- in the TeamSpeak forums if you are interested.
: k# B; h8 }! Y# r | - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) {9 t- {1 j7 V5 k
- Borland was used. This driver can only interface with the client library that
0 i# w( j0 X7 b1 H5 n8 a$ U. W - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 O) F, M' @. ^% c+ [
- client library - basically all you have to do is to use a 3.x client library as
9 K0 U7 b1 z4 b0 G - "VendorLib" and a 4.x database to connect to.
$ B5 h# [9 T- ^; s3 h2 j; I - If you need more info about dbExpress, you can contact Borland.! `2 P; y# f( `- a' P1 h. ?# J
- 4 f/ r W& Q% u, L: X, A+ D' S
- ### Doing the work ###
7 G& |( o7 R9 g - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 A1 X/ r' y, o$ v
- the perquisites right, just open your server.ini file, and add this section at
* P; y& Z* a/ Q0 |4 n - the end:
3 e; Y2 x/ U9 s M4 A4 Z+ R! ` - ---cut here---4 A g9 N0 s; \: P
- [DBEXPRESS]5 H9 V+ w3 r$ M( v
- sqldir=mysql_sql9 S6 C$ \1 Z( l! S: P
- Drivername=mysql8 _! m. f. k7 n* A2 W
- Database=Your_Database_Name_Here/ V+ a# u; g" R. ]" |' G
- Hostname=The_PC_the_MySQL-Server_is_on/ A0 r" P# n: u, ?' ?4 i
- User_name=User_name_on_the_MySQL-Server# K# N" r0 V/ m* }+ b# x
- Password=Password_to_go_with_above_user_name0 f4 N- G6 j/ Y6 ~1 B
- GetDriverFunc=getSQLDriverMYSQL; J6 N' G, V% U
- VendorLib=path_pointing_at_your_mysql_vendor_lib$ M9 G% k. M8 [
- LibraryName=path_to_libsqlmy_libary
! y4 B9 F3 { |4 m- s4 f5 l0 _ - Active=1
h5 {) C2 ^1 w* K' h - ---cut here--- \& N0 J7 O( m2 l8 s
- In my environment (a linux box with a MySQL server running locally) I have:
$ B A: ` H: X0 d8 k - ---example--- G1 n4 V7 }% I2 y- ?/ g
- [DBEXPRESS]2 h4 `9 @* v( V: T5 B
- sqldir=mysql_sql+ B8 h6 a: P/ G1 `* w+ L* m
- Drivername=mysql9 i# s @; _: d" {- i0 @4 b# x
- Database=test
8 Z, o! l F: R, d: V - Hostname=localhost
) u& U, G0 M5 p1 @* G& O+ F. n - User_name=testuser: H/ l2 q) w8 p; c1 f
- Password=my_password4 ?( W b8 @/ Y' y+ v
- GetDriverFunc=getSQLDriverMYSQL
6 S) g/ N5 z* X* @/ Q' l - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% F; d8 c& N5 c0 i+ `0 V" n2 l$ u, K
- LibraryName=./libsqlmy.so' i; _# C, | ]/ {
- Active=16 L. b' e# b! U# _4 t. z
- ---example---6 U) [. u6 u Y+ I! B I
- ! g4 Z9 \+ l0 p1 G
- On a windows box, also running the MySQL server locally, it would be: H ^+ i0 ]8 h) \* G$ B
- ---example---( @8 `$ T4 F+ S& g9 p. d7 ^
- [DBEXPRESS]# m c+ A: a1 G$ V
- sqldir=mysql_sql7 J1 s# u. h$ H& l+ {! r8 p( R% c
- Drivername=mysql# \1 }) ? U/ l
- Database=test
* a& q' Q0 n) p! J - Hostname=127.0.0.1
4 s4 m" M! R& k1 } - User_name=testuser& z- u& z: n) t1 f
- Password=my_password+ S0 Y8 a) Q* f9 d
- GetDriverFunc=getSQLDriverMYSQL Z4 b* |. m& U4 u, _: w
- VendorLib=libmysql.dll
. R/ O% D; u4 D/ p5 p+ c - LibraryName=dbexpmysql.dll
. d6 v) O+ c7 H0 ? - Active=1
' A5 U, j* t6 j2 M5 @ - ---example----
0 i; Y: y! J" d/ G. }3 x3 G - - written 02.03.04 by pwk.linuxfan
8 F! @. s$ C1 k8 t( o$ E9 p" {
6 W6 ^" v1 j; i) l/ C" x
复制代码 |
|