|
|
麻烦翻译一下,下面这段文章:xhan & [; l/ Y: I. k9 n' F" ^: H
! _$ G" Y; R" |9 h# F
-
: x& J5 L4 V* C; F* U5 n- p - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######% U7 V9 w9 W$ a) G
& @1 J+ j" h3 m- ### What we need ###
4 g( Y M5 w7 X - Naturally, we will need a MySQL server to store the data for us, this document ; s( z4 K+ L! [0 M
- will not explain how this can be done - there are documents out there for the
7 z% f4 {+ E9 h9 E$ d" Z7 j - interested. The requirements include a (empty) database for TeamSpeak to use- A2 F8 }1 V/ M Y4 q7 q. H H
- and a user account (username + password) that has the permissions to do stuff
/ R5 @! G8 Y2 o9 _+ y - with the database. Additionally, you will need a vendor library installed on the% d7 i. j1 l7 E$ F. V/ U
- local machine, this came with my MySQL install.
" N n, Y d( _5 m# U' n: x$ ?, S7 o - These instructions will not tell you how you might transfer your data from the
7 r: c6 A1 D _% Y% }8 I: N - SQLite database to the MySQL database, we start with a clean and empty MySQL
* I8 Q/ r+ r1 K1 S! e+ B! t, l& B - database.
- C, R9 S$ K; \5 E$ H3 L2 z% y2 O+ I - Some users have reported ways to import a SQLite database into MySQL, but at3 ?+ ^, i" r2 [: d% V% a7 ~
- the time of writing, there are still too many issues - check the current status/ r B r( [+ Z
- in the TeamSpeak forums if you are interested.& H( e4 e4 s4 D
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
; n: m9 p3 v- F: a0 R - Borland was used. This driver can only interface with the client library that
/ f- c. \7 f$ D# _; ]1 F5 E - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% a: o" P, c& Q- f! ~ - client library - basically all you have to do is to use a 3.x client library as 5 @) z! t' q1 M: i4 |
- "VendorLib" and a 4.x database to connect to.9 X% X( |: Y5 K h+ T5 u2 j
- If you need more info about dbExpress, you can contact Borland.; Z' U3 X8 s3 S4 B
- # u* h6 i) K: K0 C
- ### Doing the work ###
6 L3 Z( U% [: A - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ O$ Q# c8 V* o- v/ k
- the perquisites right, just open your server.ini file, and add this section at
$ h( Q5 ^- o5 g; E/ h - the end:2 C0 n( `* P+ f) `8 L6 H+ l# c
- ---cut here---% j$ n# o3 C# ]7 W; @3 Z- t7 J9 }
- [DBEXPRESS]
! _- B* p" N Y6 h - sqldir=mysql_sql
8 p( C) {8 s) x( } u/ u( f1 d! r - Drivername=mysql |$ `6 a( p; j" I; A
- Database=Your_Database_Name_Here
" c$ r/ _: e. E, w7 a! k B- S - Hostname=The_PC_the_MySQL-Server_is_on
9 z1 T1 L0 p! J2 r4 K0 \ - User_name=User_name_on_the_MySQL-Server4 Z8 ]' F$ `1 D/ N- N' ^5 }+ i
- Password=Password_to_go_with_above_user_name
( U" D$ V% A. f" {- }7 L& s) v# e - GetDriverFunc=getSQLDriverMYSQL
* m/ |, [, r7 E0 [3 C7 S - VendorLib=path_pointing_at_your_mysql_vendor_lib5 u7 G. G& `+ R7 L/ N9 Z# N
- LibraryName=path_to_libsqlmy_libary0 z& j6 D+ o/ G+ b$ k! z
- Active=1
2 Y) \$ P+ K8 V8 \1 U% ^* w( z2 [. G - ---cut here---0 }3 Z! Z0 I2 C. k
- In my environment (a linux box with a MySQL server running locally) I have:# V2 b5 e6 h- t" ]/ {
- ---example---3 s5 i% ?. E( l. X, A: m, Z3 ?
- [DBEXPRESS]; M, q1 W( p* E- h& [$ m# \. E
- sqldir=mysql_sql, Q2 @1 g/ \5 E/ d$ @2 G; Y
- Drivername=mysql$ k9 I2 O) _- C( u. J9 Y
- Database=test9 S ] q- k/ ^! \( Y1 b2 S
- Hostname=localhost
: h2 _8 B, A# t - User_name=testuser
6 h" X9 ^: h X B7 t* i - Password=my_password
. u7 B- _2 \* A* |$ I - GetDriverFunc=getSQLDriverMYSQL
+ g6 O4 _0 {1 P - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
4 G. r7 h* D" V/ ], s4 ~2 D/ X - LibraryName=./libsqlmy.so1 I. V- }" s2 a* l. [& H" ]
- Active=1- H4 m7 x3 ]* n" O
- ---example---
' m& h/ u& R4 [) c7 k
: W. T- Z) n, @6 ~% x- On a windows box, also running the MySQL server locally, it would be:
5 C2 R( n% G/ O1 U8 ~& A1 f* w - ---example---
9 \* A& M0 j, v! V - [DBEXPRESS]
0 g- O! R8 g7 e+ l - sqldir=mysql_sql7 z, v$ ^3 W6 u! {$ G' O
- Drivername=mysql& o/ J: j4 X. }, n' r( G. t
- Database=test
/ T' v$ Q) e7 r9 B1 ^ G - Hostname=127.0.0.1
/ [* Z, P- E' J( k" H. f - User_name=testuser5 m: n1 W: `$ ^; c x, e
- Password=my_password
4 C7 ^) _7 E u0 L - GetDriverFunc=getSQLDriverMYSQL8 E& \/ W( r$ c
- VendorLib=libmysql.dll2 s* Q5 V8 |% @
- LibraryName=dbexpmysql.dll* h4 B+ @8 f7 m% A
- Active=19 A0 i: }8 M# ~$ I
- ---example----
/ `- z% W0 D. I u# Q' Z Q1 Y - - written 02.03.04 by pwk.linuxfan
7 g* y8 `2 `! D% B$ f& B( n
% {# o4 u0 G0 v# G, w f3 f( |8 W
复制代码 |
|