|
|
麻烦翻译一下,下面这段文章:xhan ! K& N. W9 z& j; C( x5 S4 H" R
2 H# O: B, o5 R ]
- ' i r, p9 O M- I( @+ N
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; Q0 B! O, M3 ^2 U' u, Y5 @1 c
4 i3 ^. r5 z2 K5 Q! \- ### What we need ###
4 l/ B' N- H+ Y& ]* _$ P - Naturally, we will need a MySQL server to store the data for us, this document
9 S' x3 S( z: A# g0 R - will not explain how this can be done - there are documents out there for the
q0 [2 A; e# [2 T. | - interested. The requirements include a (empty) database for TeamSpeak to use
' l. z4 M, a" g% g+ | - and a user account (username + password) that has the permissions to do stuff
4 c4 R$ ~2 O& x5 z - with the database. Additionally, you will need a vendor library installed on the
! G, ` f. y& U$ P - local machine, this came with my MySQL install.
$ f: @3 Q* v! O! B - These instructions will not tell you how you might transfer your data from the
6 R4 ?# c' ^: F6 e2 I7 n. i - SQLite database to the MySQL database, we start with a clean and empty MySQL
& A4 Q2 @1 A1 t* D - database.5 m F% w& ~7 r/ }0 w
- Some users have reported ways to import a SQLite database into MySQL, but at
% v2 ?& _8 h% Q" m0 h# |" ^ J, ` - the time of writing, there are still too many issues - check the current status
2 W% y( L+ k5 F' C2 {4 n0 M2 Z9 I - in the TeamSpeak forums if you are interested.4 ]1 y' D2 ?: l, `+ |% d- I
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) s) R5 }$ r) Y0 t# n8 x5 q+ g$ F. u
- Borland was used. This driver can only interface with the client library that
9 I' I; T1 g- U. e - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 E6 t4 T+ J ^9 K& s* w
- client library - basically all you have to do is to use a 3.x client library as
, H1 I; t4 c* n; [! h% y& G/ { - "VendorLib" and a 4.x database to connect to./ t1 e2 u. k; J( y, i+ F% }
- If you need more info about dbExpress, you can contact Borland.: F; O3 I$ ~; u) B2 e+ A8 O
- - G, U; l. l& ~
- ### Doing the work ###
0 P3 w3 {$ a/ C3 m5 T - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
) Z& W8 v# h6 d% i9 ]3 ` - the perquisites right, just open your server.ini file, and add this section at$ ]5 ?( Q* N1 r1 Q( O5 M
- the end:
6 E& o& v7 ^, L5 N3 K - ---cut here--- ~4 M% K' {, i# r
- [DBEXPRESS]4 X I: @1 W4 E
- sqldir=mysql_sql
) H6 _- N$ w5 e4 @6 m - Drivername=mysql o* w, n( a$ q+ c% |7 V/ }# W. }7 s
- Database=Your_Database_Name_Here
& b* w' t9 [1 E/ C0 B6 ?/ F - Hostname=The_PC_the_MySQL-Server_is_on
% k7 F1 U+ \- s - User_name=User_name_on_the_MySQL-Server
9 B' G6 _( f6 e8 v _7 H9 A+ o - Password=Password_to_go_with_above_user_name' N# D. _/ ~; J- F
- GetDriverFunc=getSQLDriverMYSQL2 W0 V( |( D$ _) u- l2 \& `* w8 S+ w1 N
- VendorLib=path_pointing_at_your_mysql_vendor_lib
V: @5 K( R! s5 ? - LibraryName=path_to_libsqlmy_libary& a7 z) [ m2 h6 `: g
- Active=1
9 Y" b2 v, C0 D' B - ---cut here---
1 y) a. m0 A/ M6 m; B* m# ]( D - In my environment (a linux box with a MySQL server running locally) I have:
* h. ?9 U/ e( \8 q4 s - ---example---7 Z& D w4 J+ U; @
- [DBEXPRESS]
, X( p) \/ n0 w# Z1 H# \' M) | - sqldir=mysql_sql9 b5 M# E/ ?+ z
- Drivername=mysql
& u* I5 f) m0 ]1 g9 ]3 s - Database=test/ s, q% M" \+ C. N. P" |
- Hostname=localhost
+ Z( h8 r& J' s$ V) N/ _ - User_name=testuser4 L4 t6 J# o4 i/ p" }' i
- Password=my_password: C5 c l3 O$ a7 z: o* N$ h
- GetDriverFunc=getSQLDriverMYSQL: k+ Q: h, T7 B9 j* o8 K
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
* C' O" @3 C9 ~; Z - LibraryName=./libsqlmy.so
2 B) D, n9 l6 k4 N3 v# ~6 |( `3 L' f7 @ - Active=12 m, Z+ D& e3 R2 f
- ---example---
( [/ r7 d4 f5 ^& } - , S$ y0 [+ f% d
- On a windows box, also running the MySQL server locally, it would be:
; h' y7 E6 Q9 R! V( d# q - ---example--- W$ P4 @& `% a" a7 H
- [DBEXPRESS]
* [( B: h3 q3 \ e$ `5 j) S# |0 l - sqldir=mysql_sql% o: |7 ]$ a: L
- Drivername=mysql X1 D9 x$ N& v: @1 R+ z* U
- Database=test! C1 x6 P- n- v0 d. p
- Hostname=127.0.0.18 z% W: N* l& W, a
- User_name=testuser
* e8 }, R1 Y. s1 a6 J K - Password=my_password
) K# Z# R# j. N2 |) } - GetDriverFunc=getSQLDriverMYSQL
8 p' ^$ s" B7 O9 P: c - VendorLib=libmysql.dll
: h% K) t( I, y5 _3 R. }# j$ n# X - LibraryName=dbexpmysql.dll' o3 M/ i3 X# q0 z0 |( F' L# P
- Active=1
7 n+ I! Q) R/ W; L - ---example----) _# \9 W) T% B& A8 R o+ R
- - written 02.03.04 by pwk.linuxfan
0 q. P' ?1 N7 E8 A+ \- g4 g
; `- }1 J f8 d% c( O6 Z' p
复制代码 |
|