|
|
麻烦翻译一下,下面这段文章:xhan - y( ~5 l9 O1 t1 o+ }/ U
+ ]$ ]. M. s$ ]4 h5 O. ]3 A
- ! e2 h: y r! g: ~& I
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######. J0 A! |7 `+ b- J# R" g9 D
- 8 o, U& L" b) {
- ### What we need ###
* x }# j3 S/ ~# Q( v* g+ t - Naturally, we will need a MySQL server to store the data for us, this document ( L5 H" h2 `; ~
- will not explain how this can be done - there are documents out there for the
# G" ~" F( w2 R* d2 c' x - interested. The requirements include a (empty) database for TeamSpeak to use
: h* ?6 }/ N, U% V3 Y( P6 s8 b' K, ~ - and a user account (username + password) that has the permissions to do stuff
, H! O% [5 s" d( w; D - with the database. Additionally, you will need a vendor library installed on the2 H0 D: S4 H" r4 [3 L; @
- local machine, this came with my MySQL install.
" y* \, b% U3 U/ x$ Z Q5 m - These instructions will not tell you how you might transfer your data from the
" N0 B; ^4 w8 ^( u5 V# P - SQLite database to the MySQL database, we start with a clean and empty MySQL8 p& g# g3 f1 D, b5 e
- database.4 k- e9 l! I: P; b
- Some users have reported ways to import a SQLite database into MySQL, but at
# `' O9 o0 L0 D3 V j - the time of writing, there are still too many issues - check the current status
7 r0 b0 [$ d9 L6 f( g - in the TeamSpeak forums if you are interested.
& g/ m1 J j7 g( u0 S9 g - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 h% J6 v& @0 r3 c6 X- L - Borland was used. This driver can only interface with the client library that
6 l+ {" {5 D2 _2 V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 E3 _, ?. v) l- B& _
- client library - basically all you have to do is to use a 3.x client library as . o. K. \! z+ _2 c, r5 z
- "VendorLib" and a 4.x database to connect to.9 v% Y3 t2 o0 Z$ }" W& {
- If you need more info about dbExpress, you can contact Borland.$ _/ b' y, d: ^9 V3 [ a T/ k
- ) d4 u# q1 m; C+ j
- ### Doing the work ###
5 a, W9 H3 h4 O4 j - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" s5 \ X% {5 C/ }+ N5 Z; n
- the perquisites right, just open your server.ini file, and add this section at v/ K( s1 y( b3 m6 i
- the end:# m x' i: z* s; P( s9 Z
- ---cut here---* U, }% N T1 @, K/ @( ?
- [DBEXPRESS]
8 z" u' c3 m J- ^( R - sqldir=mysql_sql0 N. t q$ }: E0 q- o
- Drivername=mysql
% ~% A9 z) R7 c - Database=Your_Database_Name_Here- V6 g. A U9 o- Z* r2 F
- Hostname=The_PC_the_MySQL-Server_is_on
y% }6 j- y% ?$ S; e7 `7 Q - User_name=User_name_on_the_MySQL-Server
2 h1 _# [$ D! |3 ]9 O - Password=Password_to_go_with_above_user_name
) @) c+ o2 t3 y$ Z - GetDriverFunc=getSQLDriverMYSQL3 P/ [4 ~) N! v: W0 U
- VendorLib=path_pointing_at_your_mysql_vendor_lib
5 I& ^. Z9 r; `" _9 |) G - LibraryName=path_to_libsqlmy_libary
( ]. j4 H6 J4 X( ] - Active=1
; ?9 X; h: f* h' M9 s% u - ---cut here---/ q2 ]0 R- I# V8 D& u
- In my environment (a linux box with a MySQL server running locally) I have:
) X7 U# J g) r6 n! H - ---example---
0 c. W8 `) |- ~2 Y9 C( f5 q - [DBEXPRESS]
. k0 Y: i- T% O& r/ i9 B% N - sqldir=mysql_sql
6 u! B8 a+ w9 U) L: e8 _0 C - Drivername=mysql
4 d: X: Q4 g$ w5 P2 e& j* x - Database=test7 M3 i8 w \6 @5 Q
- Hostname=localhost( g9 e; e/ I: G* B& I
- User_name=testuser6 t6 I/ J% W3 i: {3 V( F5 o
- Password=my_password& m5 |! ?6 K7 X; P9 @+ _, N8 ^* W
- GetDriverFunc=getSQLDriverMYSQL" }1 k6 \. x! B9 [- ~6 L1 [( N/ u
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
& T1 C6 [7 F, i% e0 Y! w - LibraryName=./libsqlmy.so
" `! K) ^9 c8 n: l) G( u; i* g - Active=16 T" Q8 F3 d$ d- o. N
- ---example---
$ V( t( G; l, T- j% X4 m6 k
) u+ C( j* o) n+ `+ X) h- On a windows box, also running the MySQL server locally, it would be:
8 a5 r/ J7 b0 ?8 U - ---example---
- @# l8 m9 g. q - [DBEXPRESS]
8 l. }+ L8 f- c - sqldir=mysql_sql
& r: j, r9 `; K: L - Drivername=mysql
' Y% I0 H9 S1 G+ n% s - Database=test
% y0 O/ t# K! Q+ ?; Z l% f - Hostname=127.0.0.11 X3 J7 B1 z! O- M
- User_name=testuser
3 y% b2 C8 K% T/ b - Password=my_password: U/ U5 `1 {) W2 J9 X4 Z8 U2 D
- GetDriverFunc=getSQLDriverMYSQL' h" D' X- V7 s9 I) U
- VendorLib=libmysql.dll/ m& D. ?6 X" o' r: W% E
- LibraryName=dbexpmysql.dll
- Y! B- u/ f) ~% ~* s( B& E! X - Active=1& [5 M v2 C y9 Z# j0 c4 I
- ---example----
/ N. S6 o5 s4 W - - written 02.03.04 by pwk.linuxfan
& ^+ w K' W- f, u( a
4 q# t/ g% }$ R7 D2 U
复制代码 |
|