|
|
麻烦翻译一下,下面这段文章:xhan . p! J/ t. _0 i, }2 F0 J/ O% I
0 b6 K7 Q: t! `! S. H( O* z. i' [0 x m
- " ]+ y9 _& `) T. d t$ g4 @8 d% c2 N
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 H2 p9 P& Y9 j6 E1 ^, z1 b
5 g" E. T" ]4 X; Y( G- ### What we need ###
: B" ` y% B/ z( {# z& X - Naturally, we will need a MySQL server to store the data for us, this document
5 {. @6 R; y6 Y' e. i" f7 P - will not explain how this can be done - there are documents out there for the + @7 J, {& c) `( {8 a
- interested. The requirements include a (empty) database for TeamSpeak to use
3 o N6 V: @' S; ^7 B - and a user account (username + password) that has the permissions to do stuff4 B* ^* c3 f' m/ A6 L( u9 C/ {
- with the database. Additionally, you will need a vendor library installed on the
# c2 ]! o& \# N8 h - local machine, this came with my MySQL install., V" E. m0 J; e1 `
- These instructions will not tell you how you might transfer your data from the
0 F. v- t [2 O5 ^ - SQLite database to the MySQL database, we start with a clean and empty MySQL
7 o8 X# {2 w# q3 `8 G$ { - database., }1 E9 g M, P
- Some users have reported ways to import a SQLite database into MySQL, but at
) [: b% a% y# i) e R( h2 } - the time of writing, there are still too many issues - check the current status+ ]9 [: I2 w, I: I) H
- in the TeamSpeak forums if you are interested.& F* v7 a6 \4 ^4 i8 ?
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; r% ~$ o# C. K( `" g- t( ]
- Borland was used. This driver can only interface with the client library that 2 K* v+ T) A: s
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
: p! k5 F' G! M* V z" n$ N; } - client library - basically all you have to do is to use a 3.x client library as 0 R, N, ^. U2 l8 g, e% \* E
- "VendorLib" and a 4.x database to connect to.
1 _6 b7 F- ?0 J% E B - If you need more info about dbExpress, you can contact Borland.
3 n. K6 u) y) c9 } O; }6 X S
8 i. c/ ?+ f! ~+ z6 @- ### Doing the work ###' i. W! C3 q2 p+ s8 I
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, W7 G( _; M3 `8 [+ T - the perquisites right, just open your server.ini file, and add this section at
; u, f! y- t. w# I& T2 J) \$ P - the end:
/ J0 x) O" r1 q3 J0 I n2 l7 V - ---cut here---7 c; g N% ~, r9 o1 N6 a4 I
- [DBEXPRESS]2 U, s5 V/ L3 O, d
- sqldir=mysql_sql0 C, [( m8 f8 Q7 x. ]
- Drivername=mysql7 {$ N/ p1 A* m
- Database=Your_Database_Name_Here0 O# v9 o; G5 T; [( q' }
- Hostname=The_PC_the_MySQL-Server_is_on
6 C: w& \/ P7 b - User_name=User_name_on_the_MySQL-Server
# X6 [& ]4 \! L8 B$ e$ s" a - Password=Password_to_go_with_above_user_name
4 d- f$ [* j* K9 P; ?( X - GetDriverFunc=getSQLDriverMYSQL
. s! D& a! E. V- Y3 ?5 P - VendorLib=path_pointing_at_your_mysql_vendor_lib$ r( I) _( f3 N$ P
- LibraryName=path_to_libsqlmy_libary! \' Q1 _8 z% n* j; @0 M+ L7 L
- Active=1
3 p6 N; Y- r' ?" D! t - ---cut here---
0 R9 O/ O p+ J* \# o; x0 o5 Y - In my environment (a linux box with a MySQL server running locally) I have:
I i4 [+ e+ c+ N# A% e' ` - ---example---
) [( U; T/ }+ ^" k1 W: L- ] - [DBEXPRESS]
0 U. Q+ Q! D% T) m - sqldir=mysql_sql
; B$ W0 T7 M% V, R$ h4 T+ B$ h' y - Drivername=mysql
4 P i' a, f$ K. S7 U - Database=test
1 l! `' C* i; ~ M! R - Hostname=localhost
/ T7 w" |0 T$ D H1 x) @ - User_name=testuser5 O+ m2 Z# t! L3 ?4 p/ c% X
- Password=my_password! e y! M- r, _' r5 K2 \- p) S
- GetDriverFunc=getSQLDriverMYSQL3 O# H6 p5 D% F5 u1 B
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 I8 |+ c5 m4 d
- LibraryName=./libsqlmy.so
- ]# D) L3 x' F9 X - Active=1: a7 L. c1 H+ ~3 f- T/ b, A) S4 O
- ---example---0 D5 @. P, X) [$ G
) v& Z! V/ F) |- M! j$ D/ O1 ]6 N2 q; A- On a windows box, also running the MySQL server locally, it would be:0 @8 r# d, W; ]4 o; _6 V7 K
- ---example---& p: P5 R% h" \7 K
- [DBEXPRESS]
$ o0 I: a3 q8 h5 P* g' r - sqldir=mysql_sql/ {3 i. E+ O' J
- Drivername=mysql
" F+ I6 a" r+ Z2 k - Database=test
' D ^4 S! e% T6 h1 m - Hostname=127.0.0.1
$ ?0 J- S1 }. v: ^ - User_name=testuser( ~& G( |$ {0 L$ @( F1 x$ c8 k' N
- Password=my_password
8 E' F1 g6 V$ `' F% K& F% r - GetDriverFunc=getSQLDriverMYSQL
! w# @& X2 e7 y0 [; ^9 t, V. t - VendorLib=libmysql.dll
* P8 O( P9 ?9 n5 W - LibraryName=dbexpmysql.dll7 `6 G8 j! R( Y
- Active=1
& B6 G' R7 J- P* t r - ---example----; C; r0 M9 I0 b$ `+ a0 ^: w
- - written 02.03.04 by pwk.linuxfan% A" ]1 `8 \5 J, c w& z
- + u: O; }, J* l2 g5 l+ q9 f
复制代码 |
|