|
|
麻烦翻译一下,下面这段文章:xhan
3 n& f& W" k, W; H! u3 J- N, O2 D4 O, t
-
- Q7 r: J( \1 X - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
/ t9 E3 P" I! \( Y
: `/ T! L! Y' ]- ### What we need ###
, g8 u; D- L1 U+ a5 G - Naturally, we will need a MySQL server to store the data for us, this document
3 p5 j6 A0 ~) B# c" h - will not explain how this can be done - there are documents out there for the 9 j) g) d( I+ F" g$ s
- interested. The requirements include a (empty) database for TeamSpeak to use+ s+ [# c6 }9 m3 ]
- and a user account (username + password) that has the permissions to do stuff/ [# m2 m0 u' t0 k6 I8 X" x1 T, P
- with the database. Additionally, you will need a vendor library installed on the
2 f1 M Z: f- y" Y - local machine, this came with my MySQL install.
9 Z+ n, C4 |- H, [2 r- L - These instructions will not tell you how you might transfer your data from the- P9 S% m6 w5 D/ D0 [" a
- SQLite database to the MySQL database, we start with a clean and empty MySQL9 u3 z$ ^6 H# @
- database./ ^$ H6 M- e Z$ |; s
- Some users have reported ways to import a SQLite database into MySQL, but at
o8 t4 v1 P' A; i3 }5 ?! i - the time of writing, there are still too many issues - check the current status3 a* }! O' G) F* V) y
- in the TeamSpeak forums if you are interested.& B2 A9 S' D9 A8 G! k7 S: F# b! o
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 D+ I% Z4 o( e; G" T- t
- Borland was used. This driver can only interface with the client library that
$ V6 b+ C2 H9 u) N - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this% k; a B. B# z# M
- client library - basically all you have to do is to use a 3.x client library as
4 @# X9 C4 \4 l6 ]. t7 [# s - "VendorLib" and a 4.x database to connect to.
9 e; Q# I* f' Q: c* N$ ~ - If you need more info about dbExpress, you can contact Borland.( Q- s3 g# I' Z- A- t6 i$ u
- 7 D% }% @( Y8 l
- ### Doing the work ###- z7 a( P8 Q, S# G3 ]
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, ?. q7 r/ n2 _2 \2 C - the perquisites right, just open your server.ini file, and add this section at# @& \2 g1 |1 I. c1 M1 V% D
- the end:
2 q0 B, S, ^; |8 e - ---cut here---
. |% G' N/ b, S5 x- z1 b q - [DBEXPRESS]
& D/ R3 d- ^+ G( d9 I6 } P$ \ - sqldir=mysql_sql
B# w! G% d M' q! Y& r- s+ P5 ` - Drivername=mysql
, [2 _. ~. Y9 U, ^8 s* l - Database=Your_Database_Name_Here
* U! F! Z5 U ~( N! g/ _* i- p+ [ - Hostname=The_PC_the_MySQL-Server_is_on) z6 c2 M2 d& p9 Q4 q0 N
- User_name=User_name_on_the_MySQL-Server
/ o% c+ ?6 ]2 O/ h; h! W0 h - Password=Password_to_go_with_above_user_name
4 K% R) U" l2 d! q f n - GetDriverFunc=getSQLDriverMYSQL
! M# m ~: S. ^8 _# \$ r. I - VendorLib=path_pointing_at_your_mysql_vendor_lib
# W% H7 a2 z$ q. V - LibraryName=path_to_libsqlmy_libary
# L0 g, H8 i9 P+ _ - Active=1
4 {; {# ^* L7 h N: q - ---cut here---- f* X/ V( H) [$ w9 K0 ^: p
- In my environment (a linux box with a MySQL server running locally) I have:! _ ~: v, Z6 F1 Z7 L9 ~
- ---example---! v; Z! V/ F" ]5 N5 o
- [DBEXPRESS]+ d8 s$ f# u8 h) r6 @7 M
- sqldir=mysql_sql! z" a, B( \5 Q0 ~! `% @7 U9 O
- Drivername=mysql
6 l3 y4 }8 C* f1 t4 L - Database=test) i/ ?& f* t+ K% h
- Hostname=localhost+ n) m8 {0 b" o5 o" `/ e$ _
- User_name=testuser1 h0 B( h, `" e/ Z, a O
- Password=my_password
' d' u2 J7 E$ w u - GetDriverFunc=getSQLDriverMYSQL
- n- i) U$ O: U0 P. O - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
8 ?6 z8 ]' U( ~* ^% ^, Z1 L - LibraryName=./libsqlmy.so$ b2 Y J+ N; N: _0 c
- Active=1
$ d# t1 r' P N - ---example---6 s/ J$ I+ b+ P
- 1 }2 P: E+ n7 | j0 j
- On a windows box, also running the MySQL server locally, it would be:
1 F$ e9 D: l# w- v8 @ - ---example---
8 K2 P3 U; L& l; q2 i4 w+ Y - [DBEXPRESS]& a/ x* M/ R. ~% ~' K5 z
- sqldir=mysql_sql
# ?; i. S) r* q: ^ - Drivername=mysql
5 |. ^+ i- z f( Q - Database=test
( R! V8 O1 O/ I: w0 o% I - Hostname=127.0.0.1
, U' R. E5 I$ M, e* ^ - User_name=testuser
, g$ H5 b+ {) ]6 p! |8 t8 S - Password=my_password
: G4 R" z, s7 @5 m - GetDriverFunc=getSQLDriverMYSQL! t* Q% L5 v( J1 s
- VendorLib=libmysql.dll
, v, D% f6 `; p ^% \' `1 ~ - LibraryName=dbexpmysql.dll
+ k: O7 e, m# M' U, A& b - Active=1& R& a. D1 w& {5 |! `
- ---example----
7 m: A: c; K/ \% r8 b$ c' K - - written 02.03.04 by pwk.linuxfan
. v1 h6 C& j( o; t! a - : [/ P/ j' y3 N, c' U
复制代码 |
|