|
|
麻烦翻译一下,下面这段文章:xhan 4 d' X/ i0 R$ d. V5 p( e
3 U) k& |# {, c# Q$ ^- 3 b- ~/ w# O8 y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# O- i& R1 X$ @2 d4 V0 E - 6 S6 G8 o0 d! I2 I2 p
- ### What we need ###1 R+ G% U2 S/ F7 U
- Naturally, we will need a MySQL server to store the data for us, this document 2 N+ ~7 p( j7 c
- will not explain how this can be done - there are documents out there for the + K( r4 U* W. P7 b! J
- interested. The requirements include a (empty) database for TeamSpeak to use2 t0 j7 _ h2 X4 _
- and a user account (username + password) that has the permissions to do stuff
% n$ l8 H1 [- J, {% ?3 r3 Y& [ - with the database. Additionally, you will need a vendor library installed on the
' i, X" n1 W) {2 U0 \# Z; s6 V - local machine, this came with my MySQL install.
. D% Q1 `6 M% h - These instructions will not tell you how you might transfer your data from the0 C* U8 \6 @+ x+ f5 j; n
- SQLite database to the MySQL database, we start with a clean and empty MySQL
2 J% K% g+ Z0 d; I - database.) E: L' K# J6 r3 N6 u$ h6 U
- Some users have reported ways to import a SQLite database into MySQL, but at; o% U& V( F C2 H k
- the time of writing, there are still too many issues - check the current status" s, N6 ~. _6 M. k6 T
- in the TeamSpeak forums if you are interested.
7 ?3 e# n& T1 \ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from0 p$ Q* ^" ^& A
- Borland was used. This driver can only interface with the client library that
/ Z( F$ r c' C6 o- \8 l0 a! |4 O. F - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 S# M2 v4 N: D# n9 M- k
- client library - basically all you have to do is to use a 3.x client library as
* }" ^4 y6 A I p+ B5 E! B- t$ b - "VendorLib" and a 4.x database to connect to.) D; A( h( i* ?+ Y" F3 Q/ G- f
- If you need more info about dbExpress, you can contact Borland.
/ P) @- |* ` L a/ Y8 |
& O* Q* t2 Z. P8 \: f8 X7 t. l- ### Doing the work ###8 x0 O6 s7 I, F2 c4 G2 a
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 m) H6 ^: |. |! v( Y
- the perquisites right, just open your server.ini file, and add this section at
5 ?; P8 Z$ s: \- v( V - the end:+ y0 z: O6 Z7 m* j
- ---cut here---
$ R5 g- l L. S1 E! D - [DBEXPRESS]# L5 q* K3 z5 l6 C
- sqldir=mysql_sql7 y" J9 o7 P7 U0 g) k& S
- Drivername=mysql; H# B! ^$ l+ y5 B. u5 p6 [
- Database=Your_Database_Name_Here. V' B9 A9 |. V: Y8 e W: ~2 u
- Hostname=The_PC_the_MySQL-Server_is_on
( U2 b+ ]3 q* l5 ^& \ - User_name=User_name_on_the_MySQL-Server, n3 w, \7 a" F; ^3 l0 B+ u x
- Password=Password_to_go_with_above_user_name/ i' X( K" a/ j9 t: m$ m+ q
- GetDriverFunc=getSQLDriverMYSQL
; R- S5 b$ T6 V! r - VendorLib=path_pointing_at_your_mysql_vendor_lib/ a. m% X' ]; F
- LibraryName=path_to_libsqlmy_libary
1 K- Z; o O# X* } - Active=1: N- Z, K& e. l5 }2 d
- ---cut here---, l, ^9 p" B) k. D1 V
- In my environment (a linux box with a MySQL server running locally) I have:1 C) H J$ Y0 E- \. f- Z0 Y& z) j
- ---example---
' {, n1 ?9 A3 q) \9 N* S - [DBEXPRESS]1 M% ?0 w0 [9 {: ]
- sqldir=mysql_sql
6 Z, d$ v+ C, [6 T$ X" e - Drivername=mysql
' d3 @8 \. ]- g# i' W - Database=test9 B" c9 {, b6 O5 _( ?. H1 Y$ M
- Hostname=localhost
2 j& r: k! g5 f) E - User_name=testuser4 w$ M( x& I( ~/ L" \
- Password=my_password
% W" M6 W( l+ C" ^6 f - GetDriverFunc=getSQLDriverMYSQL
9 H; c5 _* m+ d - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
C9 z' y7 I, z" b$ q - LibraryName=./libsqlmy.so
3 r9 F2 [% \8 H - Active=1
: `5 A" J4 ^5 }0 U+ x - ---example---
+ {- V! F, B4 K' N$ ^$ g - 6 C6 H* \7 @6 X' d; c
- On a windows box, also running the MySQL server locally, it would be:3 s! }3 x8 R& L
- ---example---7 O# T$ I! b4 [# J, |- s8 B( m
- [DBEXPRESS]! b8 K6 i( ?5 f. {, c7 k
- sqldir=mysql_sql
; T0 Y" a2 S2 d' p - Drivername=mysql
3 b$ A" m4 @9 ^9 V - Database=test
5 e, x2 Q& v2 K- }' H* @ - Hostname=127.0.0.1% E7 p, e& e9 }& ^* s1 s) O
- User_name=testuser
7 @3 s5 i8 g ~! U - Password=my_password2 p; e- j* B" k/ s/ {6 \; @5 T
- GetDriverFunc=getSQLDriverMYSQL3 o* g5 l \: [5 Q5 p
- VendorLib=libmysql.dll w8 J* r, G* V' k: W. D
- LibraryName=dbexpmysql.dll% D# ~5 O( F9 S8 |
- Active=17 G; r) F9 h; `! I
- ---example----
+ A m4 I* ^0 a" b) L7 Q; z - - written 02.03.04 by pwk.linuxfan, `( ^' K ~2 T6 ?0 A9 }
, E3 }0 M+ \* l1 \
复制代码 |
|