|
|
麻烦翻译一下,下面这段文章:xhan . ^0 V3 w; U- }* C) Y
* v6 j9 N/ \# k. z" r0 a- [& \* } y D5 g1 X1 ]6 M$ ^
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######! A, N# D) J' ?5 Q4 h
- ( E; A" _4 I& ^) w, Y
- ### What we need ###
' p- m7 M# P8 V2 X, r# m - Naturally, we will need a MySQL server to store the data for us, this document
1 V, h; H8 w. ^ e6 w X: X - will not explain how this can be done - there are documents out there for the 2 R2 V8 q* U% I& _; ^- U
- interested. The requirements include a (empty) database for TeamSpeak to use4 B% P& u: d# Y& o) O }4 I
- and a user account (username + password) that has the permissions to do stuff
3 ]( z$ Q; A, a& [ - with the database. Additionally, you will need a vendor library installed on the8 x- j3 Y+ h# x) Q8 Z
- local machine, this came with my MySQL install.
& l" j" G' F) A+ N5 E( O - These instructions will not tell you how you might transfer your data from the- r9 f1 M/ D! S7 [" Z6 Z
- SQLite database to the MySQL database, we start with a clean and empty MySQL
9 W7 @2 O# O% [9 m+ Z, D1 q9 [ - database.- Q7 m7 I9 x/ N/ J4 P* q- K" l
- Some users have reported ways to import a SQLite database into MySQL, but at* B1 r& P% s( X) e" M3 p
- the time of writing, there are still too many issues - check the current status: |& | M- o" Q
- in the TeamSpeak forums if you are interested.5 H; ?3 d5 A: l. @
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from0 W" H5 {; \; ?8 c8 ~9 c$ c
- Borland was used. This driver can only interface with the client library that
" U Q+ ?+ b5 j3 C; S+ A8 X - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 `# ~) g& ^/ `. N
- client library - basically all you have to do is to use a 3.x client library as b/ |+ E5 H/ I- [
- "VendorLib" and a 4.x database to connect to./ l1 O% @2 v4 Z ]: W8 ]6 z
- If you need more info about dbExpress, you can contact Borland.
+ c0 O& t4 y6 U7 P8 X8 y
/ y/ \9 R: R: E- ### Doing the work ###
7 r6 @/ ~2 b1 h. R% X& L: v8 @ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ G8 G1 r1 C ?/ N) ? - the perquisites right, just open your server.ini file, and add this section at6 k8 r9 r4 a0 J! r, n9 K2 w+ o
- the end:
* \0 p; _+ }0 ?9 p - ---cut here---
# }, ^3 J9 h6 M8 v* P - [DBEXPRESS]
" u0 ^6 {3 V. @ - sqldir=mysql_sql
8 T3 {, @8 c7 g0 R. A - Drivername=mysql( O/ P; E' ]6 A7 }5 B& x
- Database=Your_Database_Name_Here
, r5 I5 u ^0 Z! E2 a2 C+ N2 u) Z* s - Hostname=The_PC_the_MySQL-Server_is_on
& W( H: E {" x' `9 ` - User_name=User_name_on_the_MySQL-Server2 ]- A3 j6 ^5 @0 I. g6 H
- Password=Password_to_go_with_above_user_name; W* c* { v: i/ m( y
- GetDriverFunc=getSQLDriverMYSQL& E2 ?8 P* u( u5 F- q
- VendorLib=path_pointing_at_your_mysql_vendor_lib
3 o; [2 _' \5 m# M4 I/ D/ o, A - LibraryName=path_to_libsqlmy_libary$ `# F( L0 b4 ]+ A3 K9 ?) R
- Active=1
/ B' K7 q# C2 s) R# N - ---cut here---
' F: g! g$ \4 k5 f6 X8 `: c5 f3 y - In my environment (a linux box with a MySQL server running locally) I have:
$ G9 y3 u* F& M& g5 F; D9 _! @ - ---example---
, l/ K# j. A% h F& Q' ?1 n/ P - [DBEXPRESS]* j; O- {7 \4 `7 G1 W6 ^# f$ x
- sqldir=mysql_sql4 p5 u. q8 a l, u; x7 t
- Drivername=mysql8 |7 p% S2 J/ n1 N( L
- Database=test
@4 B- p: A4 n) R# \: J1 }7 v - Hostname=localhost- f& v; z9 g+ {7 P# {6 Y+ G
- User_name=testuser' F! Y0 u. K0 r
- Password=my_password
1 A& k, X& o5 L3 ]) V7 ~% g# x - GetDriverFunc=getSQLDriverMYSQL
" w$ l9 ?& p6 R* P Q! n) f - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 \% u0 i' n/ x5 h5 U/ r2 p - LibraryName=./libsqlmy.so
1 y( j4 t) S8 ?; E) ` - Active=1
4 Q s8 E5 y3 m1 a' G; x2 K - ---example---' _8 Z& W' y5 V0 w9 H- a
- / {/ b# \9 K/ B& S. y9 `. A
- On a windows box, also running the MySQL server locally, it would be:
+ J, Z: ?! Y# ]$ c8 d8 L2 D: |$ I - ---example---
$ H. O3 ]; K& k' e6 n* V9 {- b - [DBEXPRESS]" _" {9 ^# c2 D! L
- sqldir=mysql_sql2 A5 D* ?" C& ]& G3 n/ G! r' w
- Drivername=mysql+ o0 f. B4 O) W h/ R+ @- _1 n2 W
- Database=test
+ D3 s7 I& x, Q - Hostname=127.0.0.1
" g- I7 r# @" d. f9 { - User_name=testuser! g! z2 ~4 E( ?1 ^6 K
- Password=my_password6 Y/ ^! R0 q. g: B5 L m
- GetDriverFunc=getSQLDriverMYSQL% h, g$ R5 Q8 F3 F. K! B8 ]# C( t
- VendorLib=libmysql.dll
! o4 W1 \7 n+ z# S - LibraryName=dbexpmysql.dll
6 Q+ z# m9 A; N! _. ` - Active=1
+ ^% m: R% R2 J3 T1 m8 H - ---example----
; G& t' I9 D( @ - - written 02.03.04 by pwk.linuxfan f( A, q+ `1 x( I
- $ J% j+ p( S1 ?! p/ }+ T
复制代码 |
|