|
|
麻烦翻译一下,下面这段文章:xhan % F) Q \* x' K1 r: j L! C
( ^6 j( ]1 ?1 I
-
8 @7 a/ r- p- a3 | - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: o" Z2 X9 |- E- h. v) R/ M
- - c# X9 a- U q4 s6 J+ z8 E2 `4 _
- ### What we need ###
1 D+ `/ R2 [& R9 Y& `$ H) | - Naturally, we will need a MySQL server to store the data for us, this document + z1 k, p1 E- w
- will not explain how this can be done - there are documents out there for the
1 {. l) j7 a. g& D& T' E8 x* M - interested. The requirements include a (empty) database for TeamSpeak to use
1 i# D1 n( n9 K" {+ ^ - and a user account (username + password) that has the permissions to do stuff- V3 h5 S3 L+ g8 p6 n* P
- with the database. Additionally, you will need a vendor library installed on the: ?/ O* Q: r! r+ H7 ~5 B+ u
- local machine, this came with my MySQL install.& }, X( J, X4 ^1 r# o
- These instructions will not tell you how you might transfer your data from the
( L4 H% L+ F" E6 A5 |, e; t - SQLite database to the MySQL database, we start with a clean and empty MySQL
. \6 y; Q: @6 L) T$ g$ E" c - database.4 `% Y+ C; X$ Q" {( _; N1 d; h3 s
- Some users have reported ways to import a SQLite database into MySQL, but at
- `( ~2 Y! y9 w3 V$ ]4 ^7 ] - the time of writing, there are still too many issues - check the current status: r- j0 S+ G$ f4 z2 l
- in the TeamSpeak forums if you are interested.: f3 y! E* g* J8 j6 W7 j0 ~
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
& A6 ?% W( ~4 i a - Borland was used. This driver can only interface with the client library that
) v# Q" j% T0 M: ~, p( k - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 I0 R7 U# Y. R4 r" L" I
- client library - basically all you have to do is to use a 3.x client library as 7 t+ T+ y5 ]* k* c8 c" }
- "VendorLib" and a 4.x database to connect to.' Z5 s& T. K! w; {9 R3 _: N6 }
- If you need more info about dbExpress, you can contact Borland.+ f' R6 d* \$ M0 n, K
- : D8 u( Q+ ]- p9 ^
- ### Doing the work ###
5 |' u' Y! d8 x3 b# Q5 J1 ] - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all2 N0 F- x1 J+ t, \% Q
- the perquisites right, just open your server.ini file, and add this section at
, Y1 }' {9 Y5 b& _7 v - the end:
2 F: x" Z9 l" R3 g/ X. \' L - ---cut here---
& ~( q: Q& f) W! C0 ~9 g - [DBEXPRESS]
' C8 o! K5 @. I - sqldir=mysql_sql# q$ F! f7 B- B9 O! [; ?+ V
- Drivername=mysql
- q, z' l" V2 |& I# {1 V) A - Database=Your_Database_Name_Here
7 w6 i0 G. [, U - Hostname=The_PC_the_MySQL-Server_is_on
$ _* |% \9 J$ n0 ]" v. X& u, q: I - User_name=User_name_on_the_MySQL-Server( u. U% ?- k& J
- Password=Password_to_go_with_above_user_name
5 a" n5 t% R6 ~! b4 N# G: `. H( S - GetDriverFunc=getSQLDriverMYSQL
& ?" o% B7 m6 E; ]2 X) p - VendorLib=path_pointing_at_your_mysql_vendor_lib, ^! p, J! f* `8 }9 }) m$ O
- LibraryName=path_to_libsqlmy_libary' q' @! h" A/ a% {% F4 x
- Active=1
0 \1 _ ` i6 `) f! X - ---cut here---% M* e) v9 }5 {& ^4 n
- In my environment (a linux box with a MySQL server running locally) I have:5 J. @/ D1 T1 l9 B! Q
- ---example---
! c1 k3 L2 Y' m& y( Z9 C) { - [DBEXPRESS] ~3 [/ n! J* y8 Q( C. W1 V
- sqldir=mysql_sql) M) Y: X' H) u* V: E$ x* }& O4 s
- Drivername=mysql O5 N4 J5 d- W8 X# k' X# N
- Database=test
# j& l4 H& L# O" n - Hostname=localhost
b' u) ]3 R S( J - User_name=testuser
% \4 C* @+ h/ m/ `4 Y$ m. v. H - Password=my_password( I/ O0 Z$ T6 r5 J5 d+ S8 P5 s
- GetDriverFunc=getSQLDriverMYSQL
; `9 b o6 ^9 P- @6 y - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( n# v7 v, z g% B& @% F W6 g
- LibraryName=./libsqlmy.so
' v, J" \5 }- l0 J/ K _1 e4 M - Active=1+ Y. P- k# E _- [6 \0 `% g5 e
- ---example---6 t2 ^5 {1 c% _: C
# [2 i1 I! e3 C+ B' o- On a windows box, also running the MySQL server locally, it would be:
# g$ j7 \% j& A0 ^ - ---example---
. \6 z8 `# c3 l& @) Y - [DBEXPRESS]
8 p$ f5 Y: T; i# U d/ { - sqldir=mysql_sql
- j" b6 Y0 }' t - Drivername=mysql
: `) O) l4 ~; k6 U/ c4 I - Database=test, f [# N; o' t0 j; U2 x) n
- Hostname=127.0.0.1
+ A) V1 D$ O; q* j; f& U - User_name=testuser
" x5 h5 [& n9 R5 } - Password=my_password
& w9 k3 i5 g' w9 e8 P9 W - GetDriverFunc=getSQLDriverMYSQL
0 o$ D: B9 Q# j0 `0 `6 _8 Y - VendorLib=libmysql.dll+ W! {$ Z3 ?3 d% y0 [7 N3 I
- LibraryName=dbexpmysql.dll9 j: L2 l1 [) q, W3 W
- Active=10 J" D4 Z0 K: n/ [
- ---example----9 d+ f: c! j5 ~6 W( @0 v9 O" F* h
- - written 02.03.04 by pwk.linuxfan
8 r6 p5 S4 d' g
8 Q5 a* [/ r! h t8 j4 R
复制代码 |
|