|
|
麻烦翻译一下,下面这段文章:xhan 5 @. Y' ?% n8 r$ ~4 ]" c8 p' y
" Z: \" |0 m( O3 w- ( s {6 M1 M, \: J
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
2 L# c2 u$ S: ] - 8 Z) a5 L; s& @/ k/ ^; d
- ### What we need ###
: z, k! R1 [7 [0 G - Naturally, we will need a MySQL server to store the data for us, this document 5 m' k1 I& F7 Y, U- @7 T
- will not explain how this can be done - there are documents out there for the
3 E- b* S- a# Z. \$ v: s - interested. The requirements include a (empty) database for TeamSpeak to use a7 [; U' b8 ~, a( m* ^4 M
- and a user account (username + password) that has the permissions to do stuff
; j" A5 i4 w5 N+ y - with the database. Additionally, you will need a vendor library installed on the
. y' t v" q5 E5 K - local machine, this came with my MySQL install.- A/ K1 P( U8 O4 ?7 W9 t+ Y
- These instructions will not tell you how you might transfer your data from the- h- g2 l) t- f! D t' s
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 g% s. M2 X$ f8 Y3 C7 z
- database.
2 ^6 H e4 v! ~3 m9 C2 U% L - Some users have reported ways to import a SQLite database into MySQL, but at
. M2 v8 a ^3 \3 A - the time of writing, there are still too many issues - check the current status
; L1 g, v9 }. D4 f# v9 C8 r - in the TeamSpeak forums if you are interested.2 I5 {( B( [& _% q+ O" D( D
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% Z, q; V0 o" { - Borland was used. This driver can only interface with the client library that ; D. z9 r& q1 K; N0 t! w( |. Y
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ ^2 z v3 u8 D& X - client library - basically all you have to do is to use a 3.x client library as * @2 {7 y- i' b2 Q
- "VendorLib" and a 4.x database to connect to. c0 }; u- N/ v7 \0 j
- If you need more info about dbExpress, you can contact Borland.7 Z7 l8 V, P. h5 F% w, Q: t$ s
, a, U- ^& C2 N5 y w) }- ### Doing the work ###5 [+ J% @) f' O: Z+ C/ E5 i
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
* R$ B) r9 E* O* h0 u - the perquisites right, just open your server.ini file, and add this section at' P, k4 \. o0 V0 O, x5 Z
- the end:
2 v4 [5 d' w2 x4 B2 D/ P9 u - ---cut here---9 U# H1 {5 h ~* P" a. d4 K- n
- [DBEXPRESS]' f: a% C7 g, [: R6 l
- sqldir=mysql_sql& K8 Z. F; u8 r* I3 Y1 E! v
- Drivername=mysql. l4 s) H! ^0 x
- Database=Your_Database_Name_Here% d; E! M5 R; s- h
- Hostname=The_PC_the_MySQL-Server_is_on
1 I% y) `5 |; L( b/ y0 J - User_name=User_name_on_the_MySQL-Server3 d' r4 B- h* r) H0 L
- Password=Password_to_go_with_above_user_name
( ?* l# c( R( e# i - GetDriverFunc=getSQLDriverMYSQL
/ [8 N' o( w9 J9 }1 ] - VendorLib=path_pointing_at_your_mysql_vendor_lib
9 z- V6 x0 y0 c2 i - LibraryName=path_to_libsqlmy_libary
3 `8 w' o/ F% _. d+ f - Active=1
- K2 x: c- v1 \% h6 q - ---cut here---
7 L; J" |) z; `% K; C8 Z. v - In my environment (a linux box with a MySQL server running locally) I have:
0 R: }5 `4 b) w6 U* d0 t/ @ - ---example---
7 O, \1 i; G$ e" { - [DBEXPRESS]% [+ ~% N* H7 h: B
- sqldir=mysql_sql) m- q* |9 D2 b. |) h3 s6 y
- Drivername=mysql
, n% b# V# R& Q& Z: P - Database=test' u( ^1 V3 M/ ]' r
- Hostname=localhost X% u4 g6 Y) T7 P
- User_name=testuser+ s% E( d! O- u1 E8 E
- Password=my_password$ K" B' `3 E& m+ s' J0 U: i
- GetDriverFunc=getSQLDriverMYSQL
: M6 h) ?' j7 w! r - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* F- @$ O* J( Z+ \1 M4 o& I5 N
- LibraryName=./libsqlmy.so% H3 I+ N2 q4 k# G4 [& e
- Active=1
+ o4 T, r. c+ }6 G e0 y6 z - ---example---. |% t* Y" }: L3 }' V) V' b
- 4 v. s. U* T0 n$ ~! R, j! D) a1 ~! U
- On a windows box, also running the MySQL server locally, it would be:" Z5 T7 X# U+ _9 Y4 P) t
- ---example---
6 W: l8 T0 h" H7 v+ h - [DBEXPRESS]$ J7 A* i7 l2 c' e& t# @
- sqldir=mysql_sql) i% s1 Q* _$ ]! a" p
- Drivername=mysql
. [$ E/ c- ]/ C6 F - Database=test
3 d& {, ^6 S+ E% Z - Hostname=127.0.0.1- D5 h# x! C8 j8 E& q7 d; o, v* P9 P
- User_name=testuser
9 n6 Y, j1 u# | - Password=my_password
' _4 I8 ~9 c' Z# ] - GetDriverFunc=getSQLDriverMYSQL
4 w) I" C4 P; W2 y) Y2 P - VendorLib=libmysql.dll
& r" U$ e' h& d - LibraryName=dbexpmysql.dll, L. [1 v; V; Q: x E. X8 x. k
- Active=1
) Z# r' I. }( p& |- o) i - ---example----# v$ t) w0 U, A% b
- - written 02.03.04 by pwk.linuxfan, ]( _: Q! A- p a, [9 ?
! v2 D1 d- g X' Y% I! k u
复制代码 |
|