|
|
麻烦翻译一下,下面这段文章:xhan & \2 p) V6 V; V% ~8 W' F3 Z( W
5 _; b9 `: Q N+ r: v4 Y( H
- ; m2 U- p+ C, M$ h
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; E- M& ^4 L b( ^8 V% q
- ! ]/ Q O7 g& e
- ### What we need ###
, Z% K$ l a1 x: D2 K2 \ - Naturally, we will need a MySQL server to store the data for us, this document
- S4 E% [. b5 E% Z$ [* ] - will not explain how this can be done - there are documents out there for the
+ c" w: x P# p2 b$ e8 r1 N; @ - interested. The requirements include a (empty) database for TeamSpeak to use" T j4 G" j& p* ]* h1 V5 }
- and a user account (username + password) that has the permissions to do stuff5 g" z5 \4 ?, F6 J' f, u
- with the database. Additionally, you will need a vendor library installed on the
' S8 q9 @8 Z7 t) J. q8 J3 u7 z5 \ - local machine, this came with my MySQL install.
9 A# a" b+ ^$ `# U - These instructions will not tell you how you might transfer your data from the
" U G- e# |0 @; Y2 b# { - SQLite database to the MySQL database, we start with a clean and empty MySQL2 Y. Z' _) z0 G/ g4 h, ~5 a
- database.
1 T& m, n' w' n5 r - Some users have reported ways to import a SQLite database into MySQL, but at P" i, W( U3 M5 T L
- the time of writing, there are still too many issues - check the current status( T# ~- D- [+ o3 i6 d
- in the TeamSpeak forums if you are interested.- V$ F6 [0 I/ ^
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 l8 u5 |) m8 L3 p% J0 h8 R: Y
- Borland was used. This driver can only interface with the client library that / o" a' E; g4 c0 n$ e' f0 W8 ^$ n/ A
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# B4 o3 O4 V! T# R. @: P/ ]
- client library - basically all you have to do is to use a 3.x client library as
; Y9 k/ H0 o) b9 {! M4 ]' V - "VendorLib" and a 4.x database to connect to.
, v% @, B$ S! R- k7 { V - If you need more info about dbExpress, you can contact Borland.; ^% r! K+ G9 |
- 3 M. h6 c8 p6 O2 U
- ### Doing the work ###. Z7 A7 B' g, A
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
) O1 \, N5 P2 K1 I& d( W A - the perquisites right, just open your server.ini file, and add this section at
" t) L( e! l& D9 `$ e2 M( {$ t - the end:4 _$ K& V2 l1 e) s5 X# U
- ---cut here---
; F2 P8 `0 H8 r+ w7 W) X8 L$ f - [DBEXPRESS]# k" C+ i" }5 s) w0 o/ E
- sqldir=mysql_sql
# l% r% H) B8 B. J# t - Drivername=mysql
( h5 w7 l# H1 q0 ?( W5 w0 } - Database=Your_Database_Name_Here- K! s% N! Z7 q z+ [
- Hostname=The_PC_the_MySQL-Server_is_on
) X+ G9 s6 u0 l - User_name=User_name_on_the_MySQL-Server
2 l J2 U6 R9 o- u8 F3 D# w$ P! A7 @8 ` - Password=Password_to_go_with_above_user_name
; g! s$ w+ I1 i - GetDriverFunc=getSQLDriverMYSQL7 u, Q, b' f/ l. o( W" d3 ?2 v
- VendorLib=path_pointing_at_your_mysql_vendor_lib
0 [+ u: e& V0 K( z - LibraryName=path_to_libsqlmy_libary, H5 s& N5 `# ^- t; {; r6 z
- Active=1
& z6 Z) Y7 ^, M1 k0 L& Q. z* r - ---cut here---
: v* l# H/ t9 n" U5 r - In my environment (a linux box with a MySQL server running locally) I have:
# O0 L0 M0 m- {7 ~" x5 ]- Z$ ~ - ---example---1 v6 T' K% s; G" _! A; f! e3 W
- [DBEXPRESS]% h& N: D( Y9 S6 `
- sqldir=mysql_sql3 k: n% }! j. }4 q
- Drivername=mysql
; h8 y% _& J: F) Z) f9 ] - Database=test* c" L' i8 E2 j7 s4 r, j# C& z- \
- Hostname=localhost' ^2 }3 k& A1 K; }* O
- User_name=testuser
" O/ J3 ^+ r3 s" [9 k- f. U - Password=my_password
1 ^1 @. J/ d* m8 w - GetDriverFunc=getSQLDriverMYSQL
+ p1 h$ A) P4 \ g - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 p0 O; c* R. M; b# _( p - LibraryName=./libsqlmy.so x" `: d* s j4 Q
- Active=14 n: v; u0 k1 f9 s
- ---example---
0 o6 Z, B% [# u/ C - T% t: s. h: @- Z+ _5 D; I
- On a windows box, also running the MySQL server locally, it would be:% a# A! J9 a9 O
- ---example---
2 G" J3 Q! A% k% c1 Z - [DBEXPRESS]) d5 C) X" ^ `$ q4 r
- sqldir=mysql_sql
5 Q$ G1 g4 l; @1 s; G! U - Drivername=mysql' m: g* y) |2 x* p! K/ D% u8 `; y
- Database=test: I( p7 H, c" r( K. U
- Hostname=127.0.0.1
; O5 A( U' }) D6 ^* K% { - User_name=testuser
5 }) ?) H2 W8 Y# S. E! d - Password=my_password: Y& Y" o0 j. w# S
- GetDriverFunc=getSQLDriverMYSQL9 X- W/ i. E Y: P
- VendorLib=libmysql.dll3 F& G7 j) o6 N7 W; ]
- LibraryName=dbexpmysql.dll
* \# |/ G0 b- ?/ Z: O$ [0 Q& h) v2 |( l - Active=15 H5 `$ h' b4 [0 T+ ?
- ---example----% H8 m% D. I$ D( |0 t9 J# q* `0 c
- - written 02.03.04 by pwk.linuxfan! k; r9 T9 B( }: \! T1 s/ h9 z
- , m; M" @ W" [+ f6 A/ ~- { h% i
复制代码 |
|