|
|
麻烦翻译一下,下面这段文章:xhan * T/ }& m$ n* w: b# z! ~
1 i* }1 V" x- Z+ o4 i, W7 N$ ~# U0 w( n4 q
- 8 b- b& L( x7 q7 H' D
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 @ [1 h P, Q7 ? - " I. O) X) v1 A v+ x
- ### What we need ###! w! E3 V! N$ t0 G
- Naturally, we will need a MySQL server to store the data for us, this document / n& D8 V0 ] z1 F3 w, h* i; e3 e
- will not explain how this can be done - there are documents out there for the $ `7 _( r; A. ~( d
- interested. The requirements include a (empty) database for TeamSpeak to use
, p8 R7 C7 z' m4 R. }' c( m4 l - and a user account (username + password) that has the permissions to do stuff, U& @* g4 B; l; ]- H8 g8 y3 @
- with the database. Additionally, you will need a vendor library installed on the1 W) D8 r8 G' N
- local machine, this came with my MySQL install.
: G, ?0 X, u1 g4 { - These instructions will not tell you how you might transfer your data from the' C2 [% H& T# y. u. k2 i
- SQLite database to the MySQL database, we start with a clean and empty MySQL
4 b5 `' B" Y/ W, [ | - database.
# F# [" x4 k/ s& x% B - Some users have reported ways to import a SQLite database into MySQL, but at
1 P8 ~3 v' t* f+ d6 `. M - the time of writing, there are still too many issues - check the current status8 e6 A8 b" W* J- M- {
- in the TeamSpeak forums if you are interested.% l. p- P6 w9 F/ ~
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 j! S* I% j& ~7 m1 z- f B! ` - Borland was used. This driver can only interface with the client library that |* C; o' U- m" t1 s
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 s0 S$ C" k. \! F+ H
- client library - basically all you have to do is to use a 3.x client library as
+ x* k1 \1 l6 l1 G) F - "VendorLib" and a 4.x database to connect to.9 v' w, y7 |% N6 T/ r+ X
- If you need more info about dbExpress, you can contact Borland.' v+ X. B9 w, ^% p
" t) A, y+ r* y/ B- ### Doing the work ###
+ H; h4 a, J3 ]0 Z% p4 }) G) n$ D: O - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all. n6 m8 m' S0 Z8 A/ x! @" Y/ f8 ^
- the perquisites right, just open your server.ini file, and add this section at
& |2 `& i* j. H4 w9 g) s! X& e9 M - the end:/ f; l- q9 Y- C8 H3 v
- ---cut here---
( h+ ?! I& g2 {: M) E' f) r - [DBEXPRESS]
7 C3 T/ U& \! T* v9 y - sqldir=mysql_sql
$ `7 D% i/ w4 S7 M: y# O g( g3 P - Drivername=mysql
: C7 ^9 Y5 ?; g8 c8 ? t - Database=Your_Database_Name_Here
- Z7 O/ ]3 J. O' v - Hostname=The_PC_the_MySQL-Server_is_on, |$ e+ F6 @7 ^' u0 S3 l, P4 P
- User_name=User_name_on_the_MySQL-Server
* y0 y. `' R, D) L2 r5 N9 z3 d - Password=Password_to_go_with_above_user_name+ ]/ Z7 r3 [5 r6 Q9 J
- GetDriverFunc=getSQLDriverMYSQL0 A! c$ m; q( T9 w2 T
- VendorLib=path_pointing_at_your_mysql_vendor_lib
2 M+ s1 B$ ^0 I; _( | - LibraryName=path_to_libsqlmy_libary
& \7 |" q8 E6 _+ m- @/ `0 E - Active=10 }/ U1 _" l8 f/ |+ V
- ---cut here---3 _- ]$ b! A" ~1 U! J+ p8 J
- In my environment (a linux box with a MySQL server running locally) I have:7 {7 Q: {. {- Y) ]4 X6 t
- ---example---- {3 _4 }: y- h0 ^, o4 s& Z" l
- [DBEXPRESS]# L6 {0 e4 n* Q1 r% l. W" `1 Z
- sqldir=mysql_sql5 K4 [2 @9 a4 z
- Drivername=mysql. i1 A. L3 `7 u" |1 v, x$ G
- Database=test
" F( {" I0 t4 i/ W - Hostname=localhost0 ?5 l# f7 J2 T# q1 A. F/ k* B6 M/ B
- User_name=testuser
% ?3 g# ^ @$ ]7 c - Password=my_password
2 v+ F" g; k" c( `* P - GetDriverFunc=getSQLDriverMYSQL0 }8 J% l' k0 B
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
. N. O T# G: T) D5 |* ]1 l# U - LibraryName=./libsqlmy.so) z& c4 I' |3 U9 w
- Active=1# b3 O. Q |" }! j
- ---example---% V5 r) u0 P7 |8 p5 O1 {
) T# W& e6 |/ V' H4 t1 K- On a windows box, also running the MySQL server locally, it would be:$ z8 k9 Q1 s) a/ S. q+ I! u9 E; F
- ---example---
3 F! S/ z/ g/ h9 _$ H/ K$ W% Z - [DBEXPRESS]
K( E0 a1 E( X - sqldir=mysql_sql1 \1 r4 \; c A* ]/ N* s, x
- Drivername=mysql
7 q% ~. ^ |& j1 l6 k2 G5 I1 o - Database=test8 U3 e& I6 w7 Q% E
- Hostname=127.0.0.1
$ ^: O6 U* c) G+ c( ~* w8 g - User_name=testuser
3 ~0 @. K# C/ V. G) R - Password=my_password
9 q( t. h/ D. ?1 n& J% K - GetDriverFunc=getSQLDriverMYSQL
' K' J& X& r/ I - VendorLib=libmysql.dll
- U) t4 n; l# H - LibraryName=dbexpmysql.dll7 j, j* E8 `4 W* w1 t9 N& G" c4 Y
- Active=1
! i$ K; U& K& |$ M* N# L - ---example----
& f2 W& X! l T; I - - written 02.03.04 by pwk.linuxfan
* I _ c) Q& n - 2 b) N" Q7 d+ R' E- `, y
复制代码 |
|