|
|
麻烦翻译一下,下面这段文章:xhan * j2 T+ v( ]$ l8 d, h# z
: @1 I" U( a) a t+ k
-
4 V8 \! B0 d6 B U) W& \+ A6 l - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- [. k. L: z7 i, _5 ]( z
u/ i& P/ x: b' t5 H- ### What we need ###
Y9 w% I& L. C - Naturally, we will need a MySQL server to store the data for us, this document # ^ S* x4 {# U: m: T
- will not explain how this can be done - there are documents out there for the % c5 T' f* I6 c% e6 S- a3 O. ?: f
- interested. The requirements include a (empty) database for TeamSpeak to use
+ E) s' P# s4 }8 a# Z+ P - and a user account (username + password) that has the permissions to do stuff
# A# |8 M3 _% U1 t# t2 A1 S - with the database. Additionally, you will need a vendor library installed on the
5 x1 M3 k6 N7 \2 N0 H0 _/ H - local machine, this came with my MySQL install.
: Q1 F g( \& V4 n7 ^ - These instructions will not tell you how you might transfer your data from the
- O* `- D! D7 D( V: O j - SQLite database to the MySQL database, we start with a clean and empty MySQL5 e5 ]: ]* V/ ]; @4 O
- database.
( F+ q+ e* c4 g4 i - Some users have reported ways to import a SQLite database into MySQL, but at
0 C0 v' F, @5 F, Q5 Z: | - the time of writing, there are still too many issues - check the current status" C2 F$ w% _7 a$ c
- in the TeamSpeak forums if you are interested.
% C9 l4 p" w5 T! e8 S - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
+ N# _- p3 O8 C' Q$ V/ } - Borland was used. This driver can only interface with the client library that
! h. X5 v! x, ^ l8 x I - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 y% o0 l4 m$ W ]* z
- client library - basically all you have to do is to use a 3.x client library as
6 [8 g6 h- ?, I( j - "VendorLib" and a 4.x database to connect to.5 ^* P& q$ h; a7 r- V) C
- If you need more info about dbExpress, you can contact Borland.
2 R0 A7 L- }4 t2 n2 Q. H4 O - + K& j$ k! p! t6 I$ C: B8 G
- ### Doing the work ###2 g5 Y O6 }$ ^, V5 R
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
" X: x$ O+ J% J' A+ C1 |4 m/ [' a - the perquisites right, just open your server.ini file, and add this section at, x3 r( ?8 E3 ^4 e
- the end:
% w0 _& H7 z, s. E; D& S3 X" S - ---cut here---; p% W( ~; w3 ?' g3 d$ Y% i' P$ Z
- [DBEXPRESS]
w4 h: K- H m5 j - sqldir=mysql_sql
" b3 k2 A P; D% h; O4 u2 E - Drivername=mysql1 {* S0 l0 r- R; x
- Database=Your_Database_Name_Here5 ?# _9 N9 n' E! D$ a
- Hostname=The_PC_the_MySQL-Server_is_on
; E; {- y3 Q- W) F& }' o - User_name=User_name_on_the_MySQL-Server+ @1 n* p7 [& U; Y8 Z; W
- Password=Password_to_go_with_above_user_name
5 A# A- b! Q7 f2 X, |$ V; s" w7 f - GetDriverFunc=getSQLDriverMYSQL8 t& B% u6 ]; S( u
- VendorLib=path_pointing_at_your_mysql_vendor_lib
$ q7 q0 D1 S: j! k4 H9 C6 w. n1 w - LibraryName=path_to_libsqlmy_libary; ?& q6 D+ x! v2 n. x0 g X
- Active=1
$ l ` W9 V' ~! R - ---cut here---
" Z2 ?' j* }. z9 s - In my environment (a linux box with a MySQL server running locally) I have:
. L2 C# i% P: O x+ q# ^, l - ---example---2 ^5 d, M4 b+ k
- [DBEXPRESS]
- @5 Z0 \2 N/ b5 b. i, b. X6 L! E1 t - sqldir=mysql_sql2 N, F6 Z! ^7 S- T& W1 C: r
- Drivername=mysql* j: ^( W" y ~3 @. {0 \
- Database=test/ W; V# D9 V9 }* \) Y7 {: A& o& t
- Hostname=localhost- W- j. `& N0 b. s# r2 s4 U
- User_name=testuser X2 m- s; I' n6 i: P1 j
- Password=my_password0 e" J j$ M8 ^/ L, @
- GetDriverFunc=getSQLDriverMYSQL
6 r$ W( l; G9 Y' l0 q0 p# g* [& H - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) p/ X" J. y/ z8 [! p' ?
- LibraryName=./libsqlmy.so' t( U3 V ]! J _
- Active=16 V" d/ l, j& H$ ^4 f6 P) |
- ---example---' A& q0 `2 ]* A3 P- i2 o
- / X& k6 t2 I+ a. [
- On a windows box, also running the MySQL server locally, it would be:( J5 B* I; k% Q: h8 k
- ---example---
( Q! T" h8 t/ X! p - [DBEXPRESS]0 L$ f" I d5 w
- sqldir=mysql_sql
5 w& E5 J, K5 g3 q) l6 g+ ] - Drivername=mysql3 W. z8 {% N: \0 G3 [, T+ G1 v/ F i
- Database=test y g: M8 v- {2 C9 p
- Hostname=127.0.0.1
6 G7 _! N& f- ]( O - User_name=testuser: U- `2 B0 L+ u6 }- p4 {6 ^
- Password=my_password
( p0 d& ~, g+ v8 z; B% N3 C i( n - GetDriverFunc=getSQLDriverMYSQL- m0 a! i2 u% t% p1 O6 t( ~
- VendorLib=libmysql.dll
+ x4 J" d; M, D! c. c( h u - LibraryName=dbexpmysql.dll
' e; V k' O% f# q, p" C4 v7 r - Active=1! z! Q* w8 T9 x- `4 d- S
- ---example----8 F. J* E, ` s, P
- - written 02.03.04 by pwk.linuxfan7 d# i7 y, a3 M. i" W
- , i0 t2 A% G- o" N: y! r
复制代码 |
|