|
|
麻烦翻译一下,下面这段文章:xhan
" i' W p+ _- B# k) Q
4 M% j' I: E- k( j% e0 m& g# q" A+ v6 w- . b0 t9 b2 j: ^& q
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: H0 n- |9 L% q w' ]9 ?+ k
- V$ L: k) C/ P2 |2 d5 ]* ~0 J& N3 ]
- ### What we need ###
- K e" s% I: H* N4 F4 M - Naturally, we will need a MySQL server to store the data for us, this document ! r* R } O! z3 I
- will not explain how this can be done - there are documents out there for the
v% J+ F& |1 _- O9 f# D0 B - interested. The requirements include a (empty) database for TeamSpeak to use
* f( i! W- ~4 w4 O% C, f - and a user account (username + password) that has the permissions to do stuff
: H8 d. j0 Z O7 Z6 R - with the database. Additionally, you will need a vendor library installed on the
' v$ d: V) X$ E) f% M2 F - local machine, this came with my MySQL install.
1 h3 I, c, B1 C6 |- R - These instructions will not tell you how you might transfer your data from the0 a0 |0 T1 R* ~! d! e4 Q, l* X
- SQLite database to the MySQL database, we start with a clean and empty MySQL
" v+ M6 [1 j, A4 F( d - database.
. Z, S2 Q& X# y8 j; @' l - Some users have reported ways to import a SQLite database into MySQL, but at" Q S) `1 Z- G. I
- the time of writing, there are still too many issues - check the current status2 @. t! n' A) `4 F6 \# r. |1 ^
- in the TeamSpeak forums if you are interested.3 B$ e7 x4 g& c# ]
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from, j7 g ^8 l% r Y1 _3 [
- Borland was used. This driver can only interface with the client library that & C- A$ q* H: j* J! B
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ N2 S4 C% p" U. F9 d; [) ~5 [0 }
- client library - basically all you have to do is to use a 3.x client library as 7 }6 H( y; d3 |
- "VendorLib" and a 4.x database to connect to.
7 H* \0 R. U( x9 w4 W - If you need more info about dbExpress, you can contact Borland.
' j6 e. v" w n! W' p, m8 k, G: C
$ k( K, n2 E! U" j3 _. |- ### Doing the work ###
% A1 i8 a' d/ G* J) v$ a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all2 O' W% p( r' U0 O. _0 s, R" u8 n
- the perquisites right, just open your server.ini file, and add this section at
3 u4 t2 B& ?' T9 H - the end:* U( V) l8 b N0 o' G6 ?$ l
- ---cut here---
; C! u. g3 S: D% r - [DBEXPRESS]8 h7 @- F+ G* ]6 c: M2 H+ v' ?% N( }
- sqldir=mysql_sql5 d2 v: S2 B) b' Z
- Drivername=mysql
2 Q$ r7 T n: f - Database=Your_Database_Name_Here! k1 r" H6 o, |# [( ]% b
- Hostname=The_PC_the_MySQL-Server_is_on
+ v1 A$ F/ C" I, L7 g- M8 B - User_name=User_name_on_the_MySQL-Server
8 P R; E: O8 J5 N' W0 a; { - Password=Password_to_go_with_above_user_name, f& U' a7 Z, U/ l) m0 B4 H2 O+ r
- GetDriverFunc=getSQLDriverMYSQL- }% f5 W1 g# _4 V3 D, \
- VendorLib=path_pointing_at_your_mysql_vendor_lib S4 r/ `0 a2 g l: e" a$ U
- LibraryName=path_to_libsqlmy_libary
2 v; f2 v: I- F( l# C1 [, f - Active=1
+ c- N+ b R) L V }5 N - ---cut here---
6 }- r- l# o: |8 r/ b - In my environment (a linux box with a MySQL server running locally) I have:
) C7 A, m* }8 Q1 [, q0 }: ] - ---example---1 V W& L# Y- l8 Z2 G: {: M( b! D
- [DBEXPRESS]
# d+ E# Y9 j7 j$ w8 t2 q - sqldir=mysql_sql
% \) Q( H$ K7 y - Drivername=mysql
3 b7 [; ^/ l" m/ W0 k9 _: M3 H" G - Database=test
' A9 {0 a! Q2 b. X4 W1 v4 q - Hostname=localhost
6 G9 Q1 `0 n; e' M2 Y7 |% r3 e - User_name=testuser
* n; K2 i+ K6 n, c6 y - Password=my_password5 v4 q4 s4 f0 Z5 R1 w8 r
- GetDriverFunc=getSQLDriverMYSQL
4 B# ^$ V+ Z& o9 G1 i5 s# o ^8 ] - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" R* r; e+ E0 u/ L4 Q6 o - LibraryName=./libsqlmy.so/ V# ?' l) V% w+ D
- Active=1
9 D: J4 w5 p# M6 N2 V8 {( J - ---example---
# g2 e; L" a! R2 j4 _! l2 Z - 5 k9 c3 U! i: S
- On a windows box, also running the MySQL server locally, it would be:- m5 h; F: d$ i' r: d9 m" D3 T, |' m6 b
- ---example---: T' a% n8 w/ `/ ^
- [DBEXPRESS]8 h) ^4 r5 w" m( D W
- sqldir=mysql_sql/ z: m* @" j+ P. T
- Drivername=mysql
6 w: D3 }: D. Q) q6 e* X6 [ - Database=test9 `9 c( c L; h i* V
- Hostname=127.0.0.1' a: X$ w9 @: U2 T
- User_name=testuser
: Y4 M( m# A7 Z. r3 c! n - Password=my_password
% R B4 J% n) H# L# L. r - GetDriverFunc=getSQLDriverMYSQL
! p/ W! z( c9 M" T7 h. x - VendorLib=libmysql.dll
8 h f# s7 }; H - LibraryName=dbexpmysql.dll3 ^ e3 ^0 o3 g
- Active=1
( h2 a" L/ @* k9 M8 a2 \& e5 E - ---example----
1 ?# Q# n6 p/ T3 d7 s- A8 f% W' H - - written 02.03.04 by pwk.linuxfan; G& w: ?0 ^2 N2 h0 G7 ?* N
" h. j" @" T$ U$ `0 u p; G" X
复制代码 |
|