|
|
麻烦翻译一下,下面这段文章:xhan 9 ^. D$ ?2 I; w* u5 O+ L
) d2 S7 U0 U3 `4 P, W1 ]& Y- 5 d7 q9 g* E' O! y6 }- e
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- S/ a+ t5 t. U. [7 r$ |
- . j/ X+ L; r4 O2 t" E
- ### What we need ###
( m$ S8 f8 e/ j1 U - Naturally, we will need a MySQL server to store the data for us, this document : Z) t, R) Z" p1 J& r
- will not explain how this can be done - there are documents out there for the - ^) ], L9 t2 \4 a& e
- interested. The requirements include a (empty) database for TeamSpeak to use
2 }* K# [, N- B4 `' e' \0 Z& U - and a user account (username + password) that has the permissions to do stuff
?2 U. F) b5 Q8 ~9 { t - with the database. Additionally, you will need a vendor library installed on the. y. j' G5 a( K
- local machine, this came with my MySQL install.
$ c; P" B' d" w8 a# e+ u - These instructions will not tell you how you might transfer your data from the* f7 @% n8 X3 n) s
- SQLite database to the MySQL database, we start with a clean and empty MySQL
6 b2 }9 Q! c" R* t9 e, k1 x - database.4 w7 V8 X3 R, z% o! |
- Some users have reported ways to import a SQLite database into MySQL, but at
( Q+ ~ V' r1 J - the time of writing, there are still too many issues - check the current status+ w( Y" w- G9 c
- in the TeamSpeak forums if you are interested.) F% u3 ?, c0 }9 Q& Y$ X. a
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# E2 C6 m, N. b4 r' b
- Borland was used. This driver can only interface with the client library that ! U: q7 ~+ ]! }: l
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. u) p) @! v- A" R; }& @; w0 E( W) U - client library - basically all you have to do is to use a 3.x client library as 5 E9 [! m$ E' X% F' i
- "VendorLib" and a 4.x database to connect to.6 a) y# {4 ]5 d9 Z" k: P6 D/ ^. i
- If you need more info about dbExpress, you can contact Borland.
! d" v- b9 B& S
1 r% ]$ j$ I6 z9 G V a- ### Doing the work ###8 M3 e; o1 h1 O
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
$ K9 |- Z2 N' L2 l3 d! D5 d f3 g - the perquisites right, just open your server.ini file, and add this section at
. a- t7 F1 D4 Y2 Q- U% g% z - the end:- Z# k N) k/ J. Y. _& _$ M
- ---cut here---
/ R2 p: z8 P, h" F - [DBEXPRESS]4 u/ L1 L+ m0 P# t Z
- sqldir=mysql_sql. }* j% ?+ m0 ~( P8 U
- Drivername=mysql
1 e/ V' P5 d2 W9 @9 n - Database=Your_Database_Name_Here
' M2 i: W0 i7 X* ~) x - Hostname=The_PC_the_MySQL-Server_is_on
7 E! ?; F8 { a' ]/ K - User_name=User_name_on_the_MySQL-Server
$ m. E8 e: r: e/ L+ V& r- m- E - Password=Password_to_go_with_above_user_name6 I% M% N3 `+ U6 Y+ S% n+ e
- GetDriverFunc=getSQLDriverMYSQL
, I- a [+ P8 T% ]$ Y - VendorLib=path_pointing_at_your_mysql_vendor_lib. _) z: u3 I( e2 J; G
- LibraryName=path_to_libsqlmy_libary
. E1 M8 h2 o0 M7 c3 ? - Active=1
3 Z4 [, j/ O: I; Y* F - ---cut here---
# U# O/ O; H' K9 p- W$ S - In my environment (a linux box with a MySQL server running locally) I have:
# w& Z8 U3 ~2 E9 k. `7 w1 ^ - ---example---
: Y5 C, N) D2 t$ }: L# {! t - [DBEXPRESS]
2 b; C* m8 ^ ~8 A5 \. f - sqldir=mysql_sql
# \* y, K( U# i6 A - Drivername=mysql
% n/ W0 Z/ j; {! U9 S" x - Database=test1 s9 |! \1 j) z+ [% r- q
- Hostname=localhost
* p: e* a7 B/ z - User_name=testuser) N3 E6 ^) _% ?. ^3 ?' o' u3 ~
- Password=my_password
& d1 k" F/ b& _* `' @ - GetDriverFunc=getSQLDriverMYSQL0 e4 K: v, m( S; o4 I% c6 H2 a
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) M) l2 J. H$ r) I
- LibraryName=./libsqlmy.so
/ O% b6 X4 ^: Y8 n - Active=1
* A1 M$ [8 w t9 }9 L - ---example---
/ @$ C6 f# Z/ C7 Q7 j - ; g$ S1 E S! E+ i
- On a windows box, also running the MySQL server locally, it would be:
/ p( J' L9 T9 b0 h: X1 f0 a - ---example---
: `8 c6 r$ X# d, G1 R - [DBEXPRESS]; T* V* t* ?+ H) f
- sqldir=mysql_sql
/ o) y% G/ }8 s: T. J' E - Drivername=mysql5 }9 v2 y9 @6 m* a+ h* o
- Database=test
7 p) [, t2 W0 K$ C - Hostname=127.0.0.1
- A2 C+ B/ ^+ \5 m# I( a+ t# e - User_name=testuser
; W- R. c) E# k6 }9 H- } - Password=my_password9 c5 q/ O. J2 l$ x5 q
- GetDriverFunc=getSQLDriverMYSQL
, b8 a5 r6 r5 {1 Q) D( g' O* Z3 o - VendorLib=libmysql.dll
! h1 W2 c4 ?! }' G z - LibraryName=dbexpmysql.dll
; h8 c/ g5 y% U% u - Active=18 Q! c3 |9 R: Z$ Z1 d: C- ]
- ---example----, X) \" L- Q* ?/ u- \% ^
- - written 02.03.04 by pwk.linuxfan. D% \0 Z& t. |. j
1 b) G% _9 n- U6 |0 V/ b/ w
复制代码 |
|