|
|
麻烦翻译一下,下面这段文章:xhan 9 L: y$ S' V ]: l5 w
& i' o+ c" j& J0 p8 F" T
- - b' i" P' x1 n) U5 l! f
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######, v+ ^2 b6 a! O' A4 N3 \5 R
- $ Y. Y. P" {& J, h/ A2 z+ O
- ### What we need ###
- \7 t# l- D' O( ?4 z5 |& J$ P - Naturally, we will need a MySQL server to store the data for us, this document ) K2 w9 U) e' x: c4 \7 o
- will not explain how this can be done - there are documents out there for the
( k; e v" S X# Y1 {5 v - interested. The requirements include a (empty) database for TeamSpeak to use
& H) I: g H, `7 Z1 u - and a user account (username + password) that has the permissions to do stuff
5 E L( M* B Z2 E - with the database. Additionally, you will need a vendor library installed on the, t5 T9 Z( ]; r8 \* E, k
- local machine, this came with my MySQL install.3 o: J% b6 W( X7 n( N. G# Q) Z/ y
- These instructions will not tell you how you might transfer your data from the/ s9 k7 A: B1 w) X
- SQLite database to the MySQL database, we start with a clean and empty MySQL- O- [* W! e9 H$ j7 J" h6 h
- database.
, q8 V% i H1 y9 g - Some users have reported ways to import a SQLite database into MySQL, but at
, H; [ S! O1 Y. K - the time of writing, there are still too many issues - check the current status
0 C J; E' a% S9 B - in the TeamSpeak forums if you are interested.
2 _6 g6 [' E& Y2 U- b - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ o1 n. ]' T u2 [1 w
- Borland was used. This driver can only interface with the client library that
. p E. C2 T5 L+ n# ^0 Q% h - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
1 k- X' Z( L* B2 O - client library - basically all you have to do is to use a 3.x client library as 3 N- e8 ]% {: @' g q9 ^, u
- "VendorLib" and a 4.x database to connect to.
7 E( ~8 h) f: Y - If you need more info about dbExpress, you can contact Borland.
0 c% b" G' p/ h; ]7 {" m( W4 n1 m - 7 |+ O6 \: n7 x) l" P
- ### Doing the work ###
5 R' J, m- m4 A# v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 T6 J0 {$ U* N0 K' H: Y; ^ - the perquisites right, just open your server.ini file, and add this section at
: M6 Y# c. j* j% c; N" K7 L7 K - the end:6 u3 b- s6 l( [- I, p2 i5 q
- ---cut here---
9 m( q- C/ A4 e, m' { - [DBEXPRESS]
6 D) H: X! G! B/ d5 }& C - sqldir=mysql_sql
5 a1 w, i3 n, `$ b; f - Drivername=mysql
2 O; Z% z, z L8 Q' F - Database=Your_Database_Name_Here
- G! p/ S* z. ] - Hostname=The_PC_the_MySQL-Server_is_on
6 u8 d/ p* K% j& S! \& [4 ^" C - User_name=User_name_on_the_MySQL-Server
8 \' i/ y! N" u- g% W - Password=Password_to_go_with_above_user_name
% Z% R6 C7 E. T; f3 J - GetDriverFunc=getSQLDriverMYSQL
0 u4 b/ o+ }( w. ?& { - VendorLib=path_pointing_at_your_mysql_vendor_lib7 \6 M' D' `9 w5 R T# P
- LibraryName=path_to_libsqlmy_libary
9 d7 C1 | Q/ G6 Y+ B - Active=1
1 n! K; }# r6 W8 K* x - ---cut here---/ [% U; I# {5 N3 K. n$ m
- In my environment (a linux box with a MySQL server running locally) I have:
' C8 i9 ~; S) C5 p6 l* _ - ---example---3 \) O# B; x" w+ u) z
- [DBEXPRESS]
1 V! I5 B. I# H# h- M# X1 J7 n/ O! J+ { - sqldir=mysql_sql
# {& K2 w; ]+ R2 R9 t0 M) T - Drivername=mysql$ Q5 U1 a/ y& x; k" h& W
- Database=test
2 N3 Z: B+ w* A6 r0 H - Hostname=localhost
- g3 D& A# a. V+ T E( v - User_name=testuser1 h) x. `' _2 q+ ~2 E+ m
- Password=my_password
1 f& S5 |/ a @2 i% a/ W' d# \ - GetDriverFunc=getSQLDriverMYSQL
" V7 ~" N4 z& u, p, b) g - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) t, N2 B' o# \3 ?/ @
- LibraryName=./libsqlmy.so
# l& q( O0 B x g0 L k& k9 y3 X - Active=1' W6 R, q6 X9 u; H4 M) i
- ---example---
8 y7 W S* I4 a: V - . ?& f$ w9 F8 M4 S" Q
- On a windows box, also running the MySQL server locally, it would be:
2 o% g4 f& y8 X$ H - ---example---
& ?/ f% _4 f8 D3 J! F) {; ^ - [DBEXPRESS]
g! v3 N5 F9 }. r8 Y [ - sqldir=mysql_sql! v6 {' u7 A X( h& H
- Drivername=mysql; [7 {( s1 z! V
- Database=test
4 G- g& B& p# Q1 O( Z d' g - Hostname=127.0.0.17 P( X) V; ~# z
- User_name=testuser, W7 {( P6 m: p( B; ]
- Password=my_password9 n- V5 W- \& l
- GetDriverFunc=getSQLDriverMYSQL
+ g2 p* N& ~2 v7 T- G. R - VendorLib=libmysql.dll
" E f% R- @( J4 {; k1 B, b% B - LibraryName=dbexpmysql.dll
" U4 f, t/ _4 @9 {* Z - Active=13 ?. K* x. J7 v
- ---example----
5 ]$ N4 I, y3 j* @* o: K. K - - written 02.03.04 by pwk.linuxfan, ?6 {8 i" ]9 V2 y
- / X) l' E1 l/ b0 S* K! N4 W) Y
复制代码 |
|