|
|
麻烦翻译一下,下面这段文章:xhan - u# g7 w) a" Y0 |" S* l4 P8 ~" |
+ @" t5 ]3 u. }- R! Y6 n8 N# T3 r |
-
' M3 }; \: w, z) z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 q; `% O( G1 h6 U* u/ e" R5 w6 o
3 l: ^% J/ l- V3 o9 u0 j: y- ### What we need ###
s( k- Q( R# t# Y% e - Naturally, we will need a MySQL server to store the data for us, this document / x( P' t% l( I- l, v
- will not explain how this can be done - there are documents out there for the 3 Q) r$ S/ _2 o! X3 `
- interested. The requirements include a (empty) database for TeamSpeak to use
7 n" v; m( ?3 P" U5 w/ q - and a user account (username + password) that has the permissions to do stuff9 U' s+ e* ^. M- B- p2 s% d
- with the database. Additionally, you will need a vendor library installed on the
9 ]( C/ h3 a/ K6 c. P3 M - local machine, this came with my MySQL install.
7 W) f: O4 F$ _$ {" e7 S/ }/ N$ ` - These instructions will not tell you how you might transfer your data from the% F- q# U9 E7 T7 z; A( Q3 L
- SQLite database to the MySQL database, we start with a clean and empty MySQL
1 E( n' A. \) a5 w3 `" N, X3 J1 ~ - database.9 S9 D7 ?" N3 {0 a
- Some users have reported ways to import a SQLite database into MySQL, but at& v8 U9 x {$ c0 U1 P
- the time of writing, there are still too many issues - check the current status
. E) @5 t9 r8 t2 R - in the TeamSpeak forums if you are interested.
( W- P! G; w7 o i) z% @" p" d - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 R" ]5 U/ B3 i4 h - Borland was used. This driver can only interface with the client library that
" C$ q8 w' U! ? - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 m9 K9 t" ^) U! a" s5 j - client library - basically all you have to do is to use a 3.x client library as
" h9 H& M- Y: N' e$ [% u - "VendorLib" and a 4.x database to connect to.# l# K6 e: F+ `% X9 `8 n
- If you need more info about dbExpress, you can contact Borland.4 S( a p4 j1 I2 @
2 ], J, _, `# W- ### Doing the work ###1 r& X; o# J% \9 s
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" V2 c4 W/ R3 ^5 M# {
- the perquisites right, just open your server.ini file, and add this section at
" ^& A4 F# m. g2 |; E - the end:
! i6 z" O$ W$ l0 q- S( g' _ - ---cut here---
* n; \1 C3 G: @8 T* _4 O: f - [DBEXPRESS]6 L/ u, W. U [- c. {: D8 b
- sqldir=mysql_sql" [ \) M( B; S2 Y; C3 H2 b* c
- Drivername=mysql
: L. ?* X2 ~* T; y& ^ - Database=Your_Database_Name_Here; u. ?* Z3 j0 M' `/ K& w
- Hostname=The_PC_the_MySQL-Server_is_on
# v, u! c& m |6 N# A - User_name=User_name_on_the_MySQL-Server
" }2 h/ Y }+ j' A' z$ i/ Q J. p - Password=Password_to_go_with_above_user_name: V/ f6 e! v+ ^$ o8 @% p
- GetDriverFunc=getSQLDriverMYSQL
7 l b- }8 z' b6 X - VendorLib=path_pointing_at_your_mysql_vendor_lib3 \6 V% k9 B' W, H$ w; `! C
- LibraryName=path_to_libsqlmy_libary
. F0 W8 Y) s: P/ q5 I/ ^ - Active=1
* B" \6 U8 B* r4 S - ---cut here---
+ N$ F* j. x4 `2 m3 p - In my environment (a linux box with a MySQL server running locally) I have:7 |0 w0 l4 j& z, G/ I
- ---example---7 ~$ J& P* R6 j# `
- [DBEXPRESS]
/ |5 l, \& ^4 A* } - sqldir=mysql_sql
2 w# u& n# {/ ^7 T - Drivername=mysql3 [3 w" O/ t N4 C' Y
- Database=test8 d0 ^2 B0 i ]" i. N v
- Hostname=localhost% S( c# W# ~' }4 F9 s3 U+ J0 c
- User_name=testuser
/ x% Q, u4 k' K! V# S - Password=my_password
5 E/ B0 R5 ^$ J2 k- @9 y; c% \- k - GetDriverFunc=getSQLDriverMYSQL4 o- T ]5 L6 x
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ K g, b( T, V9 Y* M# x; Y
- LibraryName=./libsqlmy.so+ ~6 K5 r9 i6 z- e: X
- Active=1. P2 B; h) b% r y9 F- u
- ---example---3 |" d4 ^& c: t# Q% i" R: p
1 x& n5 D) m2 q: C8 W/ |$ r- On a windows box, also running the MySQL server locally, it would be:! |( Q6 e U% s* R% {7 d
- ---example---
" h) b) O+ ]* P: I, S - [DBEXPRESS]
0 h; z' b; E+ v - sqldir=mysql_sql# z4 y/ z) `6 `
- Drivername=mysql
! o' z$ c8 H- Y, @) Q. X - Database=test, D: W2 u2 l, D& l; }8 m
- Hostname=127.0.0.1
' y8 z' |; K$ I j" s - User_name=testuser
2 c/ n9 n8 x$ d. r - Password=my_password
0 Y. E& P' T6 w( W e - GetDriverFunc=getSQLDriverMYSQL+ A6 t0 o/ F; ?3 z% W, \+ A
- VendorLib=libmysql.dll( j! q3 |& q; b9 ?$ @9 W
- LibraryName=dbexpmysql.dll
- R" F, X; h! h+ R& h - Active=1
# z q9 [6 f5 t! j5 D - ---example----
' v6 X5 t% L+ X0 d% A7 y - - written 02.03.04 by pwk.linuxfan
) c8 J' Q K( f1 v, S - # `; a9 F5 ^, I u$ s* X V7 i+ _
复制代码 |
|