|
|
麻烦翻译一下,下面这段文章:xhan ) `2 G. `/ W! S1 V2 r# ?
; [! r- B" H: i# Z" h-
/ j! h4 p7 n2 m4 Z4 l9 r - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
7 t$ B3 o3 R" _9 G* t - 5 E3 V& w3 H& g; H6 r$ Z# y3 |) j: k
- ### What we need ### q7 o9 ]# H3 w7 y: v2 S
- Naturally, we will need a MySQL server to store the data for us, this document
/ U$ C: g! R$ k - will not explain how this can be done - there are documents out there for the
! L: y7 L6 d$ H; F/ g - interested. The requirements include a (empty) database for TeamSpeak to use
1 M* o6 q6 c% F+ a$ n - and a user account (username + password) that has the permissions to do stuff. |7 o+ N' J. D, D
- with the database. Additionally, you will need a vendor library installed on the2 M' p3 Z- H# Z% y8 P- W( n
- local machine, this came with my MySQL install.5 E: u; _* N8 }
- These instructions will not tell you how you might transfer your data from the
7 [& A r6 F' Y8 f1 x) l8 n) O- D - SQLite database to the MySQL database, we start with a clean and empty MySQL9 H/ w+ U+ l! ~* N
- database.7 R7 s- U' |4 K0 l% n- G5 p. ~
- Some users have reported ways to import a SQLite database into MySQL, but at
" f' l* S" g) l2 Y - the time of writing, there are still too many issues - check the current status( G6 x% V$ A7 m8 K2 @* N7 C; u
- in the TeamSpeak forums if you are interested.
5 R, L) X7 X, i4 }: k. S9 n+ B7 M% b - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 J3 |7 G" ?8 d# V+ |( c
- Borland was used. This driver can only interface with the client library that
4 ~/ ^7 r9 D. p) n! z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 |; y* i& b9 V) `( X - client library - basically all you have to do is to use a 3.x client library as
% f+ `, |7 _' Q! G - "VendorLib" and a 4.x database to connect to.6 M8 t8 {& j* ^
- If you need more info about dbExpress, you can contact Borland.
3 L( v2 j$ o9 n' v( {- N
8 @8 W4 T, m1 `- n0 M! E: y- ### Doing the work ###
9 G4 W7 T/ |" p( `; B0 G, t% V - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ G$ a4 T+ w2 h! ~% n" S
- the perquisites right, just open your server.ini file, and add this section at
; w7 i4 S( G7 j0 S1 }; r - the end:: d* |# N* E3 p3 `' Y7 P
- ---cut here---
& Y: b& t; P7 v2 M - [DBEXPRESS]
X$ _: D- M: N- K. z+ Z, ?& w - sqldir=mysql_sql8 u$ K% M& u9 p8 @
- Drivername=mysql! v( U9 q v' n9 o' n) R
- Database=Your_Database_Name_Here0 h1 C3 o7 I* o7 t8 D
- Hostname=The_PC_the_MySQL-Server_is_on9 s0 A4 a7 J' k4 P' ?6 i
- User_name=User_name_on_the_MySQL-Server" I# l6 {& i; j( t: ?& U/ [" {5 P
- Password=Password_to_go_with_above_user_name; s$ H Z1 O) Q. E
- GetDriverFunc=getSQLDriverMYSQL! B0 g4 a: L4 v$ k+ h4 `
- VendorLib=path_pointing_at_your_mysql_vendor_lib
( d) l+ R2 \7 D7 F6 n9 v( B8 w) ] - LibraryName=path_to_libsqlmy_libary/ x" T7 w) k6 a$ u- ~
- Active=1
0 _" S, [, g/ A: |: ~& O - ---cut here---/ x2 N9 a* z( B: F0 T( b2 U& `7 D, s
- In my environment (a linux box with a MySQL server running locally) I have:
/ _! N! _3 B, X9 [: d1 t - ---example--- e' f3 x$ [6 ~* g6 D9 u
- [DBEXPRESS]
0 x. V' k) i$ R x9 w - sqldir=mysql_sql5 ^) t7 p8 f3 N. U8 X
- Drivername=mysql( F- n3 [/ p% M6 b, Q; g$ {: H4 u
- Database=test
& U5 ]3 |% Z% A2 \ H2 e- {/ g - Hostname=localhost( I) C# C) d$ H4 p7 `/ ]
- User_name=testuser7 R( z; N" F+ F, z6 I
- Password=my_password
T* ~# Y3 {1 r2 Z - GetDriverFunc=getSQLDriverMYSQL
- N) W( Y' G& W9 f" ^6 @4 y3 J - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; i" C, s7 O* Y4 ^0 X# f, z* v
- LibraryName=./libsqlmy.so$ a" ^8 I( s9 A' \# V) s' l
- Active=1- k7 |/ v! p; j9 e( n: e9 y
- ---example---- w2 @$ M: q1 y+ B) E
- 3 c' W B/ X* F$ U9 }& A* K' X9 [
- On a windows box, also running the MySQL server locally, it would be:
: j0 F& l' X+ d& ?: k- q( k" V - ---example---
6 ^8 @, l* R; E7 ~) k) ] - [DBEXPRESS], [$ D( G, o, \
- sqldir=mysql_sql8 e3 y! i0 W* @$ W- }5 r- P
- Drivername=mysql
" a$ o% f1 K5 E A" n) C - Database=test: B! U! t/ j- H3 w5 c3 C
- Hostname=127.0.0.1
7 ], A) E0 W b1 P( } - User_name=testuser
- I) g: O/ w* T8 v - Password=my_password
/ n6 Z" |; x+ `% g4 B - GetDriverFunc=getSQLDriverMYSQL7 G/ r; c1 w" e
- VendorLib=libmysql.dll
. p0 E& S1 O6 \% B2 ?3 e. Q - LibraryName=dbexpmysql.dll9 e8 p# j- P7 `" X" A+ ]- y; v
- Active=1+ o" M3 N) [) M& i- X
- ---example----! |! H v5 S- @" c% l& [
- - written 02.03.04 by pwk.linuxfan' H$ B' d. V$ ]
/ `/ g( U3 B* Y! n2 E5 l! }, F, O
复制代码 |
|