|
|
麻烦翻译一下,下面这段文章:xhan
1 _* J4 F1 e i I. a! V
& U8 }# x* j# c/ I9 I, d# O-
) m! l: U; v. a0 k+ { - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- n% w8 A1 s, j C" i& L4 S
- " _9 s% t; F+ x! \6 c
- ### What we need ###
! A( B2 Z8 v2 f5 Z ^5 s - Naturally, we will need a MySQL server to store the data for us, this document / G# c3 [0 F, ^* r9 }% R% W) G5 y( Y
- will not explain how this can be done - there are documents out there for the / W Q% ?4 U) d+ d4 o8 ~- K
- interested. The requirements include a (empty) database for TeamSpeak to use
; K" T6 N' _9 v* T - and a user account (username + password) that has the permissions to do stuff L B3 P3 q4 d* f
- with the database. Additionally, you will need a vendor library installed on the- r( w1 a$ H; b, m
- local machine, this came with my MySQL install.
% V# x) ]. {) U" h$ d! C4 b - These instructions will not tell you how you might transfer your data from the
( c I5 H0 C& j$ L$ k - SQLite database to the MySQL database, we start with a clean and empty MySQL
5 a0 p" V6 K! X4 m2 J8 T+ o* I* Z - database.
& o% Q1 t. M, c* B - Some users have reported ways to import a SQLite database into MySQL, but at
6 S+ d) ]# O) V+ ^, y& c - the time of writing, there are still too many issues - check the current status8 L; {8 m7 L$ T G# z
- in the TeamSpeak forums if you are interested.$ B* u7 R) b$ E- f; V
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 X; _$ h! |, P9 x' ?
- Borland was used. This driver can only interface with the client library that
2 _2 R$ C2 r& d3 }, g) M - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this' R, R7 h; m, K/ C* B+ Y: p
- client library - basically all you have to do is to use a 3.x client library as . h6 t3 _8 E. W$ k) H, z
- "VendorLib" and a 4.x database to connect to.
' h6 F) q" Z" C - If you need more info about dbExpress, you can contact Borland.3 U: c1 R& y( j* `( K( N4 c
& P! w1 f' H0 Y$ C$ A, I: o- ### Doing the work ###
) D9 ^" E0 o/ y% c, a$ d* j! ` - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 X# Q! n. n5 y9 J - the perquisites right, just open your server.ini file, and add this section at3 a$ P7 K/ Z( Z
- the end:
7 x* y3 ^ e2 k8 Z - ---cut here---: e d5 j' e5 f8 P V
- [DBEXPRESS]
. e* s% W, B3 n4 z' t - sqldir=mysql_sql* Z# \$ R7 N! Q- K
- Drivername=mysql
8 k; C1 h; ]3 }7 m, u, v - Database=Your_Database_Name_Here
! v2 l5 ]5 M% a - Hostname=The_PC_the_MySQL-Server_is_on
( ~# U( Z" Q" C0 P4 G - User_name=User_name_on_the_MySQL-Server
+ s! i6 c7 m" A, b& N! S" s - Password=Password_to_go_with_above_user_name
/ [$ e$ \7 u0 y1 M5 S; g - GetDriverFunc=getSQLDriverMYSQL z3 s, J2 w( s2 O8 R
- VendorLib=path_pointing_at_your_mysql_vendor_lib3 `5 Y/ [8 E1 m9 w( @0 r
- LibraryName=path_to_libsqlmy_libary
1 l3 C7 @. D, t: \ - Active=13 ~2 H) f0 ~- I7 I; y; P
- ---cut here---
- I# Q5 ^2 h; x& p2 i - In my environment (a linux box with a MySQL server running locally) I have:
6 l7 }$ C. S' l G9 v% x - ---example---
1 R9 v0 b! ^% M2 J8 S- i$ Q - [DBEXPRESS]0 Q0 Z& e2 k$ K7 D6 I
- sqldir=mysql_sql
; \* n0 z0 L/ j/ {8 V) Y' `6 D) W) W+ N - Drivername=mysql
' P1 r" p1 v+ }+ t: e9 k8 R - Database=test
2 h$ ^& ]8 e& \. H - Hostname=localhost& m* Q! R" `# C; T3 K
- User_name=testuser
5 x3 j$ _8 M( z7 Y: h - Password=my_password
( w6 w$ h, X, D/ z- I2 ~ - GetDriverFunc=getSQLDriverMYSQL! w) z. P1 i, H1 d& r
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 O) b6 O) F8 L2 G7 C D9 y6 ^
- LibraryName=./libsqlmy.so7 t9 D7 g' d- P+ D1 [! s' A! q
- Active=13 V' N2 Y5 H7 a, l o
- ---example---, F' E6 H, a. F) i+ i( ~% V% X8 ]
}& d8 P/ d/ M$ }' V- On a windows box, also running the MySQL server locally, it would be:
# S: p2 @' B. T- ~/ J - ---example---8 N: r% r' Y, T3 Z7 S6 p
- [DBEXPRESS]
0 H C5 K/ @7 u8 g: a - sqldir=mysql_sql0 p7 Q: `0 j5 _! O7 Q* u* ~
- Drivername=mysql/ _3 s: c0 r4 C' I
- Database=test
7 X& b, M$ W+ m6 @" |3 \. k - Hostname=127.0.0.10 \" ]+ y3 k6 |) T
- User_name=testuser
a2 y6 s& l1 _* Y - Password=my_password
- `, k9 Y$ _: N8 N; i: L5 l& _ - GetDriverFunc=getSQLDriverMYSQL
- I1 N: E9 W+ J9 \: A - VendorLib=libmysql.dll: q( a* @9 P" @! T
- LibraryName=dbexpmysql.dll
8 v/ [% K. f9 B% ~- U - Active=15 W! G1 _8 {6 M" b+ z0 G p
- ---example----
& k; E) F L) S3 C5 h7 M( A - - written 02.03.04 by pwk.linuxfan ?! W" D2 |; v$ l4 o* `% O
% G9 w- d, ^9 o, Y! o% e v
复制代码 |
|