|
|
麻烦翻译一下,下面这段文章:xhan # P3 O- O+ e5 h2 ~6 F- w. Y
9 J c+ M, D2 a-
0 j+ X; Y% f! T! I - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
. g; k2 C) {, M - - M* p6 y2 s$ b5 v0 ^
- ### What we need ###
( s. k( G* k/ T/ c+ _7 ^/ F" ] - Naturally, we will need a MySQL server to store the data for us, this document
4 A! X1 y6 [5 H7 @& \* Y* { - will not explain how this can be done - there are documents out there for the 7 i: n3 _1 u7 L4 W5 m: e6 y
- interested. The requirements include a (empty) database for TeamSpeak to use# p3 [; K( i6 p- t
- and a user account (username + password) that has the permissions to do stuff2 R1 [5 ^! c" s) o/ n
- with the database. Additionally, you will need a vendor library installed on the
; H9 |5 ?% T' R% D# K+ I ?7 M( s2 X - local machine, this came with my MySQL install.
; `- x1 W& d5 n1 @ - These instructions will not tell you how you might transfer your data from the. d# r+ g2 o+ L! D* I
- SQLite database to the MySQL database, we start with a clean and empty MySQL
C2 N" q; ?* [/ i - database.7 }$ x+ `0 w5 w2 ^$ L" H+ l2 E4 X
- Some users have reported ways to import a SQLite database into MySQL, but at) _+ @8 @1 i7 t
- the time of writing, there are still too many issues - check the current status& A. M+ `2 W7 X* R7 J: F; v# p
- in the TeamSpeak forums if you are interested.' P; g: D {2 \0 L8 [2 R
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 l$ b% O1 m v
- Borland was used. This driver can only interface with the client library that
, d0 Y# p9 U* P" I6 z% R - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this$ U: M; n Y% B( j: S
- client library - basically all you have to do is to use a 3.x client library as
, q: }8 u" P2 B3 t2 a - "VendorLib" and a 4.x database to connect to.
- O1 U: E, M8 Z% Q - If you need more info about dbExpress, you can contact Borland.
. C. E: R h4 }7 q
3 l2 t% {! Z9 q2 e; F/ [0 u; H5 I( U- ### Doing the work ###( d! Q' a) ]- v" j" N& k9 }
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
* A* `5 ]% N0 F. I - the perquisites right, just open your server.ini file, and add this section at/ O: `- I1 h6 Q$ T, ?
- the end:
1 Q) ~* x+ L: D: X/ H, J - ---cut here---
# |$ W ^, H5 g+ \2 H0 d8 f - [DBEXPRESS]* } A/ y% n1 G0 a: L
- sqldir=mysql_sql) `+ V1 @, T6 a: |
- Drivername=mysql
( J# u, m8 [( { z4 s+ s+ U& Y7 d3 | - Database=Your_Database_Name_Here3 D6 p6 k2 U/ U$ B) ?7 P
- Hostname=The_PC_the_MySQL-Server_is_on+ s8 V ^& {, Z1 [
- User_name=User_name_on_the_MySQL-Server
S# u4 C$ r5 p! X3 k% h - Password=Password_to_go_with_above_user_name
' S( M0 n2 b+ e; j5 E$ n8 m. a - GetDriverFunc=getSQLDriverMYSQL
7 p. |/ {& d1 {) k7 k2 V - VendorLib=path_pointing_at_your_mysql_vendor_lib
- ]3 r# ?0 Q* m0 l" C6 j' x0 Z - LibraryName=path_to_libsqlmy_libary- d" b7 z$ G6 q$ x4 S6 O' E, c
- Active=1+ j* c" O* U# S0 @8 [
- ---cut here---
6 k( m Y: B3 g- i$ \9 o! ^ - In my environment (a linux box with a MySQL server running locally) I have:. a! f) Z2 u g! F
- ---example---- D8 ^; L6 c ]: s0 b3 |
- [DBEXPRESS]* n3 C: f3 z$ M" S1 f; s" }& ]4 x
- sqldir=mysql_sql/ E6 ~* L/ Z8 v
- Drivername=mysql
+ z0 K4 Q: S$ v - Database=test# H+ x' C a. P. g3 ]
- Hostname=localhost
" F4 Q2 w8 i. ] S @' i - User_name=testuser
$ C: d. j& `+ q0 o# k1 y - Password=my_password
7 [, \* g |' e8 ? - GetDriverFunc=getSQLDriverMYSQL
c" e0 G7 B E- M" C, Y" f( B J - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
4 ]( c2 G( C, ?0 J* X: \& \. y. _ - LibraryName=./libsqlmy.so
3 \$ y; \4 b6 Z/ X, E, D - Active=18 @7 j6 N- ~+ p$ A B& j; C
- ---example---+ [4 W; K* M+ H+ J6 x7 S
; R8 B1 _; v% q" ~3 y6 V- On a windows box, also running the MySQL server locally, it would be:0 A" f! I9 ~* |0 ^8 E! U
- ---example---
/ w U6 B1 s0 T9 ?- u& {' [ - [DBEXPRESS]/ g: M9 B1 @! g. P, u7 B9 @+ M
- sqldir=mysql_sql
: `+ ?* X! o. C' | - Drivername=mysql
% K) u8 s6 f7 f, C" ? - Database=test% }2 b0 [, W- x
- Hostname=127.0.0.1
% d/ u* u" A. a) @% r3 j - User_name=testuser
& H/ I4 V2 S# S( l. V4 m - Password=my_password
+ o4 ?' A; H# y3 F; ^+ y - GetDriverFunc=getSQLDriverMYSQL
# E. v9 J6 V" `* c( q - VendorLib=libmysql.dll
9 z& t: L6 [/ h: f! v, L - LibraryName=dbexpmysql.dll
7 Q, r# U" c0 _& D: V# f - Active=1
- a( m. b; X) G - ---example----, g( K7 h- T6 X; {2 N% Z( i
- - written 02.03.04 by pwk.linuxfan/ E0 K2 ?- Z J$ J3 u. f- ^
/ e; n& s4 u) a7 {0 U
复制代码 |
|