|
|
麻烦翻译一下,下面这段文章:xhan
: Z r. B/ z4 @. Q6 y7 G& H! _9 Q, ]3 Z. E X5 X6 J1 h" F
-
9 O; c$ U8 @8 R9 G0 |4 J - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- I+ e; y2 r- R1 ]7 e) ~- N5 X
- J r S& B8 n4 {1 O- ### What we need ###4 `' W( @( s* Q) i' S
- Naturally, we will need a MySQL server to store the data for us, this document
1 k x& \& L1 p - will not explain how this can be done - there are documents out there for the , {" I3 ]( ^& E# T' g& L8 ?7 l
- interested. The requirements include a (empty) database for TeamSpeak to use# e) i& L [6 S& g2 a! H# X
- and a user account (username + password) that has the permissions to do stuff8 V4 w' ]/ _" A5 l4 g
- with the database. Additionally, you will need a vendor library installed on the9 d; i& F0 u; n, y; b/ D
- local machine, this came with my MySQL install.
& K h: c) m" G9 a/ \8 D1 x: R - These instructions will not tell you how you might transfer your data from the" r) \: l; L# I
- SQLite database to the MySQL database, we start with a clean and empty MySQL8 ?9 s# X% U& P7 h7 U9 T
- database.
& b# |+ A3 }$ r4 R* l5 W, _ - Some users have reported ways to import a SQLite database into MySQL, but at& y* z% R/ O) o7 D
- the time of writing, there are still too many issues - check the current status
, ]' S# e; W3 g n' [0 J - in the TeamSpeak forums if you are interested.
) N6 l. X" n% e - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ C& Y' m2 j8 h/ L - Borland was used. This driver can only interface with the client library that $ I5 s1 d; f! J+ G3 Q
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. Q* L" ~2 b3 ?; Q, Z# Y - client library - basically all you have to do is to use a 3.x client library as
3 A3 ^: s' r$ u' l - "VendorLib" and a 4.x database to connect to.
, ^- _. k: L: |( `( T( s( h6 } - If you need more info about dbExpress, you can contact Borland.3 t) t" N6 ]5 P/ J# W1 E6 Z3 P
- 5 a5 S& Y7 q- V+ s
- ### Doing the work ###/ U& J* M% K1 [8 t8 k2 r9 K2 a
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ I4 t5 }7 w! Y4 y - the perquisites right, just open your server.ini file, and add this section at! M3 P2 x/ I( Z, K3 J1 W- t3 o5 }
- the end:* L1 C+ c8 f1 C
- ---cut here---
]# d0 G* y' M& }" ^, C9 } - [DBEXPRESS]- u4 z5 ^9 w d4 m/ K: i
- sqldir=mysql_sql
: V- J- y7 |) @' \ - Drivername=mysql
1 f% h: U9 g5 ~& _ - Database=Your_Database_Name_Here
/ N+ m. Y9 z+ W( U% }- s0 x' R - Hostname=The_PC_the_MySQL-Server_is_on
3 N. a G7 r0 `% E# I - User_name=User_name_on_the_MySQL-Server) O8 B, K; a) P+ g- a! ]6 b
- Password=Password_to_go_with_above_user_name( k* L/ ]* W5 X' m
- GetDriverFunc=getSQLDriverMYSQL
6 A& p$ D9 t ~& v, d - VendorLib=path_pointing_at_your_mysql_vendor_lib* _& v& t4 l0 I' V* b' {: w
- LibraryName=path_to_libsqlmy_libary9 P6 l" a2 ]4 o/ K
- Active=1
5 @! g! T$ D( P - ---cut here---
& A: T+ f5 p3 F* w - In my environment (a linux box with a MySQL server running locally) I have:5 i: {& }% {# X6 W7 w) \
- ---example---
1 v$ j; _# D$ l* } - [DBEXPRESS] X, i) ~! P: `: X$ l; |
- sqldir=mysql_sql
* j$ d9 K2 c2 k; U0 b. S( U( b - Drivername=mysql
+ c6 r4 F N% n- k8 H/ L* w - Database=test3 U% v$ y1 e+ G, [# p! q
- Hostname=localhost+ R' u4 }0 ~* z& d* U% M
- User_name=testuser
) |; i9 R/ S6 Q8 b d; Z - Password=my_password
! o# O1 V9 d' `3 T - GetDriverFunc=getSQLDriverMYSQL9 }9 `$ X0 L, i$ }
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 V4 H9 K& L+ [$ h7 Q; V - LibraryName=./libsqlmy.so
; F* y- Q$ E! q# F1 o - Active=1
3 N% z2 `: K n# R2 U% b, |7 p6 h% Q - ---example---1 o% U2 ]1 `6 w/ N5 ~# q7 f& b
- . z4 z% f: L1 D5 ^5 A# i, ~
- On a windows box, also running the MySQL server locally, it would be:3 C2 [5 R1 f5 ~2 V# U) S
- ---example---
' b% o' q5 Q8 ` - [DBEXPRESS]4 f8 { q2 R3 ?% _
- sqldir=mysql_sql
' j2 @+ B1 v' c' |5 ^: Q - Drivername=mysql
- d2 [5 P) \4 t. L - Database=test
/ i9 N2 q; p% i$ w, P9 S8 M+ o - Hostname=127.0.0.1
5 y$ V, Q. P# N, ~5 I - User_name=testuser+ h5 ]% S' \' p) E: t
- Password=my_password+ S: i: B& H4 J9 A. h( h6 A
- GetDriverFunc=getSQLDriverMYSQL
' y0 Y7 p9 W- H* \2 r - VendorLib=libmysql.dll
# q1 u, u4 v& m0 @ [2 h8 k8 Z: F - LibraryName=dbexpmysql.dll
: S, O7 |" P$ W( c4 | - Active=1
$ X. v8 ~5 w: M& p- x - ---example----
4 e% _8 x- [( z- Z - - written 02.03.04 by pwk.linuxfan
% |1 ?! z; w; p0 X% p" Q5 E - ) N& o: s- s1 m$ w: T+ ]
复制代码 |
|