|
|
麻烦翻译一下,下面这段文章:xhan
8 ~( l& H! E9 b- v- Y% ?; `2 S7 h. p" P; ^% m
-
) U& s" L2 E Z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######3 C6 ^9 O3 Y3 g; R
- 3 Q4 n0 ?7 x, g: |
- ### What we need ###
; [# s8 E5 E! w - Naturally, we will need a MySQL server to store the data for us, this document
* K2 P- F7 O+ S2 N - will not explain how this can be done - there are documents out there for the
2 W/ B; I; J! Q8 I - interested. The requirements include a (empty) database for TeamSpeak to use
( j% | g# _3 [8 m4 o; O6 G - and a user account (username + password) that has the permissions to do stuff, d0 G" X0 _& F" T( W
- with the database. Additionally, you will need a vendor library installed on the
; a5 o+ p4 \. f/ w% x, E# u - local machine, this came with my MySQL install.' y$ l/ E7 Y5 k' V+ ^) X& F8 n
- These instructions will not tell you how you might transfer your data from the8 D7 W+ \% I9 o8 [( E" M
- SQLite database to the MySQL database, we start with a clean and empty MySQL
x! d: k/ _; q u+ `" k - database.$ {4 u% _& L& j
- Some users have reported ways to import a SQLite database into MySQL, but at$ e. X* r& K6 Y
- the time of writing, there are still too many issues - check the current status& i2 ^9 J5 H( Y, E+ K1 Q
- in the TeamSpeak forums if you are interested.
; O& I% l; }4 W/ C/ Q( F - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 T0 Q0 A/ n1 x4 u: B - Borland was used. This driver can only interface with the client library that
* v& R# ]) V& K$ n: x. c% R& o - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 [& N/ R# I# A
- client library - basically all you have to do is to use a 3.x client library as 7 n/ v2 e+ T8 r3 m8 z7 t8 B
- "VendorLib" and a 4.x database to connect to.9 V# }1 Y4 x- \( \2 D% r' [
- If you need more info about dbExpress, you can contact Borland.
0 N J" _& i- L$ }8 o1 G: N - 4 ^& f3 {7 E" ~( Q, w
- ### Doing the work ###* U7 y. C$ G' t1 c1 Z
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all+ E4 \& i' `& g# H6 X1 P, x2 {
- the perquisites right, just open your server.ini file, and add this section at0 a& g) a) D; ~; `+ D
- the end:
& [/ r3 E8 H# y% x; O1 |3 S - ---cut here---9 j2 w) @0 B; K3 k& d
- [DBEXPRESS]4 P& E$ m/ r* C: C' h. u1 s) b
- sqldir=mysql_sql- I) ^! r R Z. p+ K
- Drivername=mysql: F: B' v6 u& i
- Database=Your_Database_Name_Here
. T* M3 v7 ?8 B- D. @/ [# n - Hostname=The_PC_the_MySQL-Server_is_on4 ?$ K7 f; }7 _
- User_name=User_name_on_the_MySQL-Server: [: p7 u5 ]# g; F5 O4 L
- Password=Password_to_go_with_above_user_name' L; P# [7 f' A! R4 K m
- GetDriverFunc=getSQLDriverMYSQL
( w& {; L( g0 X* N) G% ?& K - VendorLib=path_pointing_at_your_mysql_vendor_lib
* h+ ~" D, V J - LibraryName=path_to_libsqlmy_libary
! W" I( \# f8 g; W - Active=1
8 f* E8 s1 a* v+ x/ j/ n - ---cut here---! ?6 f- x& p2 W8 W" W# `
- In my environment (a linux box with a MySQL server running locally) I have:5 e {) N- G( \$ l v. R
- ---example---# ^1 x' ?% E6 T x" m% A) A1 Z
- [DBEXPRESS]) T# V8 Z, p- k- @, z
- sqldir=mysql_sql6 m* C( Q9 p5 D. L3 ]
- Drivername=mysql
6 m" q9 U# D5 ]7 C! e% [ - Database=test
2 |7 x: [- G+ t* N: M7 M1 X8 a - Hostname=localhost
! T$ ~: D! c' q4 c4 Z - User_name=testuser/ X; G. q. k8 V6 B5 N3 W
- Password=my_password
8 Y% Q$ r N) \$ k' H* @/ J6 x - GetDriverFunc=getSQLDriverMYSQL/ l# k, [# a- o, {
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, Z/ L2 M( A! [9 O( | - LibraryName=./libsqlmy.so; G; a# W, F3 |! \" |
- Active=1
" t6 M" y& _( b" R8 z7 V4 d - ---example---
4 R) \+ C' Z$ y9 h/ T - 3 X. Y4 g% t' B8 F5 C
- On a windows box, also running the MySQL server locally, it would be:% a4 s; G" e. E4 ~
- ---example--- I4 h. c( S/ L, f3 C
- [DBEXPRESS]
7 a) X3 O9 o: {: x' n - sqldir=mysql_sql$ U) ~- N' \' G" a7 c9 t5 ~
- Drivername=mysql
" z! h, `* C5 b7 u: s% U' d7 l; ? - Database=test" { i8 o; z% B; p
- Hostname=127.0.0.1) E0 n# F5 m# l0 g, b& O9 F
- User_name=testuser/ Z/ P; F! N" k
- Password=my_password
2 \ u) P, \% ^( J0 u5 c$ f - GetDriverFunc=getSQLDriverMYSQL
, W8 j7 T2 ]! T0 L G) N1 N - VendorLib=libmysql.dll
( j% q$ A# P4 X# ]4 I: v, y - LibraryName=dbexpmysql.dll
( U1 N. M2 Q5 w* V# | - Active=1& g, \' I2 @( G3 g* F6 V
- ---example----5 [3 D: T2 a. C- ~, G4 y
- - written 02.03.04 by pwk.linuxfan
$ _7 Q# h* {9 e) w8 q4 l - & ^9 k7 { S+ u3 z
复制代码 |
|