|
|
麻烦翻译一下,下面这段文章:xhan
2 R2 T: ]) \# n, h+ [$ p4 Y" X0 _. T. @4 B. B/ f7 a
-
2 l& [6 o2 H% n V7 O/ B8 z6 l - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
5 C5 ?8 b: S3 N4 _% M3 l$ z q ] v. y - ( `! ?7 G: m; X( d# _# f
- ### What we need ###/ N* b$ v+ h- k; h2 G6 I+ a, M; V
- Naturally, we will need a MySQL server to store the data for us, this document
8 J8 H. P5 G) F+ O: Q - will not explain how this can be done - there are documents out there for the
, E) z$ U* U. P - interested. The requirements include a (empty) database for TeamSpeak to use
) r8 w) r4 Q/ m2 F4 ~) k( h - and a user account (username + password) that has the permissions to do stuff
3 I5 q) D4 w0 g - with the database. Additionally, you will need a vendor library installed on the
: K6 e7 f b8 Q+ @. ]# X - local machine, this came with my MySQL install.
. n/ N+ A6 e# Q$ R8 O# Q2 u - These instructions will not tell you how you might transfer your data from the3 n$ u+ b, M7 R% M( r4 u( T
- SQLite database to the MySQL database, we start with a clean and empty MySQL3 G. O/ v j4 c- t t" ^. ?" s
- database.
2 O* W0 |7 Q: E - Some users have reported ways to import a SQLite database into MySQL, but at4 X" z& C, y; _
- the time of writing, there are still too many issues - check the current status
* z+ G% p: C/ I& R# v5 f - in the TeamSpeak forums if you are interested.
1 v( E7 H' K( A - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from8 l- `: U2 w* {
- Borland was used. This driver can only interface with the client library that ' k& O- z6 K0 U6 R/ i
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ t3 X P# K: Z - client library - basically all you have to do is to use a 3.x client library as * ^7 G' T4 u0 W) U
- "VendorLib" and a 4.x database to connect to.
& `1 ?" c. M9 O - If you need more info about dbExpress, you can contact Borland.- r" W% Y" R" Q: i+ i9 t" g
/ r/ d0 J* V6 i( k0 j/ E# N& }: p- ### Doing the work ###
" x7 n' |: _& l9 g6 K* |( } - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all2 `: ^* R8 Y: Q. r! e) B
- the perquisites right, just open your server.ini file, and add this section at
4 P1 ?& |( H* e" z3 C _ - the end:
+ p- ]% C% S$ I9 k- J - ---cut here---. T4 H7 r4 k* R; I8 W3 E
- [DBEXPRESS]
* W3 B1 p% F' F { - sqldir=mysql_sql. n* Q3 c& i7 {/ T2 E
- Drivername=mysql1 D7 H+ ?7 ^5 Q* q' J
- Database=Your_Database_Name_Here
# u& {8 x. X- n( a- v- q! G - Hostname=The_PC_the_MySQL-Server_is_on
6 x- i- {. k; z$ `8 F, i0 B: a - User_name=User_name_on_the_MySQL-Server
( W- x# B1 I2 |7 {$ D; Y - Password=Password_to_go_with_above_user_name
i: P3 g( ?- z- R6 V - GetDriverFunc=getSQLDriverMYSQL% R0 r- b9 {- \; ?% E
- VendorLib=path_pointing_at_your_mysql_vendor_lib6 e/ [6 S2 _5 o
- LibraryName=path_to_libsqlmy_libary) A- @' N- s k1 M( o* J
- Active=1
( i% Z% Q6 l0 c' ^* B8 l - ---cut here---
7 {9 r5 E" B( T - In my environment (a linux box with a MySQL server running locally) I have:) |# z8 D1 B* d3 Y, H- O
- ---example---) ~4 Y, i" z! s$ h* z+ {
- [DBEXPRESS]
, S8 e" t/ f; C8 r( t" g, \: q - sqldir=mysql_sql _) u8 C& m4 h- `1 s4 a7 y
- Drivername=mysql1 W; q" L/ \7 D% }/ C& i5 H
- Database=test _# u) p% W% A* |) k" D# P8 H# s
- Hostname=localhost
5 w/ u, d- e" L7 d - User_name=testuser4 t, T' t! k O( g8 I R! p
- Password=my_password
2 B. N0 |$ k1 T/ | - GetDriverFunc=getSQLDriverMYSQL
) M3 r. X3 x0 N+ R- q8 ?( ^0 y - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: p# j! g' h( n% B2 o' q1 T - LibraryName=./libsqlmy.so
" q x' t+ P; T$ Q - Active=10 p1 C! T& P& N: g ~* e
- ---example---# o( o4 Y2 O8 F# \% n
$ F$ U5 A# `7 ]6 ]5 X `. }- }; O- On a windows box, also running the MySQL server locally, it would be:# x5 D5 E( z# a- k
- ---example---7 w( a# u+ t3 t
- [DBEXPRESS]( u% j6 @+ i' |1 m: v* k% w$ }) u
- sqldir=mysql_sql
5 w1 W+ r2 J) F/ z - Drivername=mysql" l" o$ A0 C! ^ e
- Database=test
5 |* J6 p* a7 m8 Y% O- q - Hostname=127.0.0.16 \% w( A0 E0 c6 `" z; ^" O" L( X
- User_name=testuser5 x% d" v, f3 x6 t: N+ F3 m
- Password=my_password
% p0 `8 d+ |; y) z. ]: O - GetDriverFunc=getSQLDriverMYSQL
1 @. h0 ] o/ n2 y e) D - VendorLib=libmysql.dll
$ d" t3 I! J9 B$ P. G - LibraryName=dbexpmysql.dll
# `; K6 b7 k1 Y3 k - Active=1
8 F( b0 \" X! n* @3 ]2 N - ---example----( Y7 r' N) B6 E/ W$ ^5 X7 O3 N4 x1 V
- - written 02.03.04 by pwk.linuxfan( ^0 [# k t; [1 S
- $ g$ T* s6 V: Y# @% `! n
复制代码 |
|