|
|
麻烦翻译一下,下面这段文章:xhan
; x% g6 u4 M" a3 K) E, `" A6 [6 S# C% B
-
( y+ l5 j" N0 ]. V# l- E4 X - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
( h( L* a$ o2 G0 ^& C4 I - ( c2 }4 z2 \' f2 f
- ### What we need ###
1 i( X( b+ e! E( k - Naturally, we will need a MySQL server to store the data for us, this document
8 D2 ^$ s/ c7 j8 S. A1 J' U - will not explain how this can be done - there are documents out there for the
7 ^/ }2 }: \8 C" N1 i - interested. The requirements include a (empty) database for TeamSpeak to use8 b8 E) k1 A' s4 E
- and a user account (username + password) that has the permissions to do stuff
5 U6 n* j4 L3 L4 o5 G. B - with the database. Additionally, you will need a vendor library installed on the6 q, u; z; t$ {- V
- local machine, this came with my MySQL install.
1 h$ d" h! J! L& I' Q1 z - These instructions will not tell you how you might transfer your data from the/ {% f9 I& i& A9 o
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 M' z2 T+ L" ]0 s: b: ~
- database.) |' F- h! v1 g- i. D; X& F4 G
- Some users have reported ways to import a SQLite database into MySQL, but at8 o2 y1 Q" T! k$ o* [. Y* _- q' r6 Z
- the time of writing, there are still too many issues - check the current status" Q- A7 l2 g7 _1 ^
- in the TeamSpeak forums if you are interested.
7 O9 x5 E) \: y( @6 c - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
: x8 V: u4 h6 y4 `0 n H+ v; N - Borland was used. This driver can only interface with the client library that
% n, \) _; O( }4 W. G - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
" n* e2 v. e/ l3 G! t$ L" `: | - client library - basically all you have to do is to use a 3.x client library as
4 ?) g' d2 c6 j b - "VendorLib" and a 4.x database to connect to.7 x) j: Q) p ~& O& D3 ], C
- If you need more info about dbExpress, you can contact Borland.. i% U5 N+ B. ?
- + s l: [5 E% |, z; d
- ### Doing the work ###; d1 |/ [+ X# [3 c6 F
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all+ J# ]$ `& Y0 ^8 R
- the perquisites right, just open your server.ini file, and add this section at. ~( j# s4 O& e! Z- p
- the end:
2 Z' N' }6 _) U8 g0 l - ---cut here---
7 z, z$ O1 h& K0 Y0 r- _8 ~ - [DBEXPRESS]8 D( H3 U' c2 A! ]
- sqldir=mysql_sql& o! i( }3 j; }- x- w* P
- Drivername=mysql
% H; p+ l8 ?- Y% k, e" c8 u - Database=Your_Database_Name_Here3 P2 b: t. t! f( r1 F7 o" d @. [$ {
- Hostname=The_PC_the_MySQL-Server_is_on" t- V9 W, o0 @/ [
- User_name=User_name_on_the_MySQL-Server
* G t4 z) \2 E! U# r - Password=Password_to_go_with_above_user_name; @6 p. Y7 U4 C C. S0 w* G
- GetDriverFunc=getSQLDriverMYSQL. d) l' i T& M; X# a1 z
- VendorLib=path_pointing_at_your_mysql_vendor_lib6 }. J/ U( a; p, C. s: w1 | f
- LibraryName=path_to_libsqlmy_libary, ]% U: W9 r2 A* r) |' D A/ c
- Active=1
0 o4 D3 I& K5 U& _ - ---cut here---
6 n4 V7 ~, g' q" X: E! X - In my environment (a linux box with a MySQL server running locally) I have:
1 _; K. Y/ E4 O; c. D, H1 \ y - ---example---2 f/ J: G7 k/ W9 `
- [DBEXPRESS]& N+ ?3 k0 C9 G
- sqldir=mysql_sql0 {6 U% C/ n1 w ~- Z- r
- Drivername=mysql/ N0 F/ y9 p: x' f
- Database=test4 w7 R( t1 Y) F: n) @
- Hostname=localhost
6 p4 m- T$ r9 }1 |; C8 j - User_name=testuser
) l- W# f2 s3 X9 E9 z) z" y2 n - Password=my_password' o/ z2 G% |4 ~! P3 O
- GetDriverFunc=getSQLDriverMYSQL
3 w( v# r! [) l- v& S$ q) s - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% ^5 o! b! Y" b. }$ ~/ m
- LibraryName=./libsqlmy.so! y! G1 e7 u6 W
- Active=1
& H0 d2 u' j7 L( Y, ?# K' Z6 u - ---example---
+ t0 S w4 ^2 L( @ - ( [! g: R$ c! w. k
- On a windows box, also running the MySQL server locally, it would be:
) I7 t$ O' B9 c2 A& d, W& B6 g( e. z$ p - ---example---
5 E4 S. w( M( l) d% R$ u - [DBEXPRESS]2 [! e" V0 `) J2 K
- sqldir=mysql_sql
/ N( |$ M( y" e) A* ]+ N) ? - Drivername=mysql
0 t: r8 h" y* p - Database=test
% |3 U# U7 t" ~. B8 q - Hostname=127.0.0.1* a- F j3 @8 n
- User_name=testuser) H, _6 h r ^" l" S
- Password=my_password: p' b* k+ g- u1 z9 v
- GetDriverFunc=getSQLDriverMYSQL
3 R0 s* A' Q! M+ z2 t - VendorLib=libmysql.dll
$ K! y% |5 |- D7 L: h9 e5 { - LibraryName=dbexpmysql.dll: G* e: _. `9 O3 [8 R( w# r% t3 k
- Active=1
; t: p: A( O3 \# V) S) z. c* r - ---example----
" s9 @$ I" _9 E# E4 e, d. e: M - - written 02.03.04 by pwk.linuxfan: l$ `# K) Z7 e" _$ h
- I V* t9 F8 c
复制代码 |
|