|
|
麻烦翻译一下,下面这段文章:xhan ( x( @- n9 _! {
; d3 Q0 {" Y: T! W8 K3 A# r4 W3 }. r-
9 r! i) b& Q5 K$ X: E - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! I9 m! a N0 r - 4 l$ i( V/ @" @ V; B6 \6 e
- ### What we need ###
7 H. [) N4 i" F% D - Naturally, we will need a MySQL server to store the data for us, this document
& M- w9 } S( `& n- B - will not explain how this can be done - there are documents out there for the
9 B5 k5 o5 B5 L' ~% R - interested. The requirements include a (empty) database for TeamSpeak to use2 ~* _% ] p8 i7 {: \, s- F
- and a user account (username + password) that has the permissions to do stuff% V$ r( e- W* L& n% w
- with the database. Additionally, you will need a vendor library installed on the, z8 b5 q6 E' o. Q
- local machine, this came with my MySQL install.
! i! j' O: Y; R" w; B - These instructions will not tell you how you might transfer your data from the
& Q+ j% z- @8 V - SQLite database to the MySQL database, we start with a clean and empty MySQL
+ k8 ?: M5 e: y* | - database.% ?- b, |7 V4 q7 z$ A: x) O9 ^
- Some users have reported ways to import a SQLite database into MySQL, but at
8 D+ M( ?0 \3 \- ~ - the time of writing, there are still too many issues - check the current status
2 w' i. S$ |3 W5 w$ r+ R0 F& y - in the TeamSpeak forums if you are interested.
' ~) `# S4 U2 k% Y `1 V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- x8 k2 H5 v' `! g2 M - Borland was used. This driver can only interface with the client library that
/ @7 c% ?, h/ R! B# x$ O, y$ O l - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
* {: a9 G9 d: p# n4 e - client library - basically all you have to do is to use a 3.x client library as 5 E. K ]" s, f% e. n d3 W
- "VendorLib" and a 4.x database to connect to.
& a( f( U5 p3 ^ - If you need more info about dbExpress, you can contact Borland.# h* a6 T) J& P2 _
- 1 Y2 E- n$ p' m5 H
- ### Doing the work ###
6 p( E5 z+ T4 ^; w1 V! u - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 T/ V; `/ c$ q8 o
- the perquisites right, just open your server.ini file, and add this section at
7 H( x7 ] Z& G - the end:
8 i% b. `; y0 F) t* }( ] - ---cut here---# K% M( @5 Y* X
- [DBEXPRESS]
% Y% G5 N$ O _- G - sqldir=mysql_sql* d1 G+ \: X4 _1 {+ V
- Drivername=mysql' [/ @" b: s( B. C* j( f% s9 M
- Database=Your_Database_Name_Here
- h; V+ o! m* I: n - Hostname=The_PC_the_MySQL-Server_is_on$ t4 A6 f) u- q/ f
- User_name=User_name_on_the_MySQL-Server; ^) W4 P! C6 y- P9 @1 v' v
- Password=Password_to_go_with_above_user_name$ j+ G: s1 W. C
- GetDriverFunc=getSQLDriverMYSQL
' l" E v. J+ f( c# ` - VendorLib=path_pointing_at_your_mysql_vendor_lib7 m" I$ G, H' A1 Z7 Z
- LibraryName=path_to_libsqlmy_libary1 U3 O. T% b0 ^% S7 c' S) `, h
- Active=1
' t) m0 V0 S- L, i& y - ---cut here---
. i6 f" Q1 e( R5 {" f6 H6 x5 G1 ?- ?2 A - In my environment (a linux box with a MySQL server running locally) I have:
0 s$ \& ^6 V/ C% _" R0 p' ] - ---example---& `. i) x" K, {- G' n
- [DBEXPRESS], N. t9 s: B2 E& j; o* }8 i1 `3 e
- sqldir=mysql_sql3 U% i7 o# O: V" O. i g u
- Drivername=mysql% _9 G) [" X" [; J* d+ g/ _
- Database=test, H/ U8 l+ H; G0 n( {# j G8 S
- Hostname=localhost
9 ]: y' {, {7 T. d - User_name=testuser
0 E9 S* a$ p% p" W% z! Q - Password=my_password& C* r- R0 [) @: T* j8 l& P: b
- GetDriverFunc=getSQLDriverMYSQL i! R/ E2 J4 W
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 I; \1 N0 B( u/ p' _
- LibraryName=./libsqlmy.so
7 @% t& d- x% J7 ^ - Active=1
0 Y3 [/ R6 O7 f0 h% ^6 l( E - ---example---3 |( x1 m% \/ |: g8 l3 d6 ~3 Q
- 3 a7 ?3 o+ K) z
- On a windows box, also running the MySQL server locally, it would be:
5 {+ ]' T8 M5 v, }' C - ---example---$ j: W. q3 T1 A9 M8 T
- [DBEXPRESS]0 j! |) g* K" N
- sqldir=mysql_sql* o, g$ ^7 f" B- L# ^
- Drivername=mysql
, m' V1 O5 Q/ m# Y/ x0 z( | - Database=test
# p1 [+ ?: A: m/ _4 U+ M5 }. M4 u* d+ ~% w - Hostname=127.0.0.1
1 {. s( R& Z& e; S - User_name=testuser8 a: m7 g# d( j; B( O2 y
- Password=my_password1 i6 G% D8 v! y/ O* ~
- GetDriverFunc=getSQLDriverMYSQL
% q- X% I5 n; P% x - VendorLib=libmysql.dll
9 j6 j" `; ?3 P' n! J* o$ I - LibraryName=dbexpmysql.dll
s" _' B8 U" w' Y8 u - Active=1
) E" A9 ]* G! e - ---example----: u5 }/ U* N: M' K5 z! C( W% l6 g
- - written 02.03.04 by pwk.linuxfan2 \, w3 U$ E b) }4 Q* F8 J- e( h
- 7 s& a0 `, p' M9 w
复制代码 |
|