|
|
麻烦翻译一下,下面这段文章:xhan : X4 f9 `6 \. s6 j
( @ E6 h" |+ D7 l0 u
- . d& l0 ^8 o: y- |" i/ ]
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
+ W7 s% r: t( ~+ N& n3 [: d
3 H% }& b: h0 ]0 a" K8 l- r- ### What we need ###& O3 ?" z- s: i$ h
- Naturally, we will need a MySQL server to store the data for us, this document
: s! _1 x- ^. p7 V - will not explain how this can be done - there are documents out there for the
( h( d& \9 m+ \ - interested. The requirements include a (empty) database for TeamSpeak to use
9 |( o7 X/ V- D: v2 V9 y - and a user account (username + password) that has the permissions to do stuff
4 N6 [3 f8 I% z) E; o0 _ - with the database. Additionally, you will need a vendor library installed on the
, e" q7 e: ~4 j; u, N - local machine, this came with my MySQL install.; F( [5 m. V, y8 a
- These instructions will not tell you how you might transfer your data from the4 t% w: A1 C8 h# u
- SQLite database to the MySQL database, we start with a clean and empty MySQL8 T7 m! A' x1 R( i$ n, J) W* X
- database.
# k. O8 f6 h8 h0 [ O - Some users have reported ways to import a SQLite database into MySQL, but at
! v! L, j9 v* I; t) B" w: U - the time of writing, there are still too many issues - check the current status3 W* U8 O9 D+ h
- in the TeamSpeak forums if you are interested.+ H# ~, Z ~( }2 E m9 B2 w) ?
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from m- q1 T/ H, o/ @
- Borland was used. This driver can only interface with the client library that
0 n% Y* f- O9 Q; C0 p - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
8 R' d9 u7 O+ B2 X& p - client library - basically all you have to do is to use a 3.x client library as
! c) C T3 c! k; H$ l - "VendorLib" and a 4.x database to connect to.
, R1 r) i4 X4 W# J# q - If you need more info about dbExpress, you can contact Borland.8 e* V4 l5 }0 S2 i: U2 b' q
2 O+ k% q2 `& o- ### Doing the work ###
+ U @* e% b8 G) U" G - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all) T8 t5 N8 m, i: s
- the perquisites right, just open your server.ini file, and add this section at
) c7 c3 h( Q! n. }% E4 ^2 p: i - the end:: i8 U% m* F0 |8 t' [
- ---cut here---0 j% h+ _5 r, d! z! l% a
- [DBEXPRESS]! S" ^5 ?* `) g& u: e- E4 o% I5 h
- sqldir=mysql_sql
, o' p# Z R! J0 P1 g* o; t - Drivername=mysql' X/ B" ^( D, i
- Database=Your_Database_Name_Here
2 J/ w$ Y# R: [2 m. W; N - Hostname=The_PC_the_MySQL-Server_is_on# ?% X; d! u: j: ]- d; Q6 @
- User_name=User_name_on_the_MySQL-Server
( ]+ N8 X" R {- [5 e - Password=Password_to_go_with_above_user_name
5 J+ P h6 q) V4 ^6 r1 j" ?; V - GetDriverFunc=getSQLDriverMYSQL
1 V- L* W, @& t - VendorLib=path_pointing_at_your_mysql_vendor_lib. ~. Z+ [7 r+ N4 v( W
- LibraryName=path_to_libsqlmy_libary; x+ {8 y" W7 M, v+ t- n" l# a: x
- Active=1
4 d+ z2 g: S* X1 y1 ?# ]% ^ - ---cut here---
- Y( }7 b; I9 [3 m - In my environment (a linux box with a MySQL server running locally) I have:
9 \" f' R% Z' N( Q5 k1 B ~ - ---example---* I/ B7 Y" ?3 O# ]% I: Y
- [DBEXPRESS]' K7 _5 S( l. w. O' b
- sqldir=mysql_sql
6 `3 S' Y4 w8 l - Drivername=mysql
& ^9 T! ?" E! D2 n* q' T) P( _& A - Database=test; W: X* y" v' D0 N! r, M
- Hostname=localhost7 v+ ?% Z0 l6 J- E& n
- User_name=testuser
& T$ V3 _, j* n: z a - Password=my_password8 I- A) C, f8 H) f0 _. H1 V
- GetDriverFunc=getSQLDriverMYSQL: \- C9 a2 L; K0 {- D1 l5 H
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
7 o6 V- U7 Z4 q$ |8 g - LibraryName=./libsqlmy.so
( O3 k# v0 a% k. c, U. ` - Active=1+ z* u% o7 Q$ y, j
- ---example---/ H" Z6 g& S% _/ o/ G' h7 m
" k( K' q) t1 a% D- On a windows box, also running the MySQL server locally, it would be:
$ O9 @+ D1 P1 y, D! e - ---example---
$ u3 l/ N% G/ d+ v: j - [DBEXPRESS]
. `* `2 t7 l, z+ | - sqldir=mysql_sql- R1 n# V- E! H6 E
- Drivername=mysql
/ v$ ?9 H3 _! ~% w. y - Database=test: P4 i6 p. _' q( z
- Hostname=127.0.0.1
) o l! o/ u& q9 T/ t - User_name=testuser
- Y0 }9 W# s* O0 Z' D - Password=my_password
8 _2 |* w2 w) J& \ - GetDriverFunc=getSQLDriverMYSQL9 W$ j8 P7 I3 }( Z8 a+ A
- VendorLib=libmysql.dll
9 t- E: y1 E# k, f4 Q. O( u - LibraryName=dbexpmysql.dll7 b/ L) X( U: f f! W2 i
- Active=1( f- a) z2 @% U+ x4 N
- ---example----
! G$ g: }7 {: Q% M2 G0 ] - - written 02.03.04 by pwk.linuxfan
. d/ Z6 g( T' i% k - / ?, M( A/ F$ n0 V( d
复制代码 |
|