|
|
麻烦翻译一下,下面这段文章:xhan ( O3 B0 ]; l6 a( y# \6 @
7 `- b5 ]0 E. k-
- w9 U7 l7 ?8 W' e, F% L7 L - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
0 [8 p2 e% R" v8 P! H/ `$ j9 i - ! X) h& S }0 ^2 ]
- ### What we need ###
! }/ a2 t; Q1 ]9 v9 C% T1 E0 U% y - Naturally, we will need a MySQL server to store the data for us, this document 1 g S% t9 y) D
- will not explain how this can be done - there are documents out there for the
9 e( l+ D2 r8 s$ n. ~$ J% q, x - interested. The requirements include a (empty) database for TeamSpeak to use
4 X6 ?( S C1 t7 g! i - and a user account (username + password) that has the permissions to do stuff
# A5 K0 J! H% w3 l4 i5 s2 q - with the database. Additionally, you will need a vendor library installed on the1 p' o) N9 O% w1 z% B- c
- local machine, this came with my MySQL install.: Z& r9 d8 E% J3 B
- These instructions will not tell you how you might transfer your data from the
' ~; [# } ?+ K0 Y$ Y7 g) U - SQLite database to the MySQL database, we start with a clean and empty MySQL' O2 o& ^3 R+ l2 i6 Y4 z
- database.
2 u/ a5 I4 f9 f- q7 F1 Q - Some users have reported ways to import a SQLite database into MySQL, but at6 I" H; Q5 A: L z' ^& p3 s% P
- the time of writing, there are still too many issues - check the current status
8 ~3 ^6 r* F" W* B$ D) V& o" q - in the TeamSpeak forums if you are interested.
( H9 L6 W3 ^( N! P - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
D; @+ _8 a+ E0 J - Borland was used. This driver can only interface with the client library that # _' }% S0 L; }9 s) q- J
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this& |, f8 S6 L @0 S0 o4 L: A
- client library - basically all you have to do is to use a 3.x client library as
$ ]4 b/ r+ L* }3 w6 ]+ N - "VendorLib" and a 4.x database to connect to.
4 y$ i) q% J% x; v0 F - If you need more info about dbExpress, you can contact Borland.3 f9 E5 P5 F3 i% E5 k
4 d! L% h' s" } @- ### Doing the work ###* G( V; T, M, ^) s; B% P; J
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' O) M2 w# ~+ Y+ U9 W/ y" S - the perquisites right, just open your server.ini file, and add this section at
3 b7 [# f8 D1 X, m$ @% c - the end:
- L7 w) t: X) @$ F( c$ W - ---cut here---
1 y. n" Z8 V+ `' M, | - [DBEXPRESS]
% T, N+ J0 O- {" @+ `: a/ k! L1 R2 L F - sqldir=mysql_sql f$ U" [' p9 v% K* b
- Drivername=mysql; I1 J8 z* d D. `% {
- Database=Your_Database_Name_Here8 G; ], {5 q/ t4 Z8 n$ Q& m
- Hostname=The_PC_the_MySQL-Server_is_on" g4 `" ~; @$ I! z
- User_name=User_name_on_the_MySQL-Server6 Q5 |3 @* N4 Q! `
- Password=Password_to_go_with_above_user_name
' N; ]* |* h1 `3 n# I( p - GetDriverFunc=getSQLDriverMYSQL
, q6 A. R. n: S - VendorLib=path_pointing_at_your_mysql_vendor_lib
" z" R6 V2 H1 X' } - LibraryName=path_to_libsqlmy_libary) E' v. h9 x! F% |" K4 b' F
- Active=1
) \* K$ [. J3 f6 { - ---cut here---" L- G" P% j l9 @2 v( @# ^
- In my environment (a linux box with a MySQL server running locally) I have:
! y' B3 K) Y- g$ q& m, W% K - ---example---! P3 }+ N# V* S1 o3 n* w
- [DBEXPRESS]
! S; _# a9 P, u6 |6 ] C - sqldir=mysql_sql
- H/ l' `; m* u; h. E" e4 e6 i, Y6 ` - Drivername=mysql
7 z6 o7 G; l- z- Y: i9 z% m6 i - Database=test
! [( x8 H0 T( z - Hostname=localhost
) G' D2 c' n* k0 V - User_name=testuser: U/ |( @- O3 g5 t1 p
- Password=my_password
; p% D9 W: b) K4 ? - GetDriverFunc=getSQLDriverMYSQL+ X! E$ s. {% K6 o
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
% A* m- h: \" c4 a3 K( b& U - LibraryName=./libsqlmy.so
# N: F5 s8 [- ]. G$ v- t h, k( A - Active=18 p2 U" o/ K* k9 s1 t4 w. @% ^! \2 E4 }
- ---example---
I$ z3 C) ~: ~& P9 h" z* P- d
8 C8 p' c( X8 M/ j- On a windows box, also running the MySQL server locally, it would be:/ O g, a P4 W$ A& } {- A
- ---example---
5 h2 F: ]5 e- q6 ], j) G2 ~ - [DBEXPRESS]' E( D1 @; ^$ `+ Q
- sqldir=mysql_sql
" B: g% M( u4 K6 G: T - Drivername=mysql
! L- P: z6 J. O4 A/ r3 h% i# k - Database=test2 b, Z g) g+ o5 ]: n+ o* E
- Hostname=127.0.0.13 u/ K M% H7 U8 ^
- User_name=testuser& `0 N* w7 _2 K; J2 x8 K
- Password=my_password) [1 G! q; r9 X; `2 X+ j% Z& D1 j( H
- GetDriverFunc=getSQLDriverMYSQL
: O0 n( r; W# e - VendorLib=libmysql.dll
' g! o& V" u- u5 t5 ~ - LibraryName=dbexpmysql.dll7 k2 P! y" L9 w3 n
- Active=10 m2 W# F+ @. }% v6 j7 `5 e
- ---example----3 G8 K& h" r3 G; L
- - written 02.03.04 by pwk.linuxfan
2 T: C A0 k' z/ I* s+ d; w - 5 j+ U- I. l$ F% z1 @* M/ q
复制代码 |
|