|
|
麻烦翻译一下,下面这段文章:xhan ( h0 [6 e' N) d6 j' s' u ?: r
2 o) b* Q! Q3 B/ |/ \; y; Z: B- ( n6 V! e) E* F2 ~3 ?6 Q
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 _! V9 q$ O9 f2 c/ C: [( C. B. f
- D& U+ P1 U8 j2 ?7 C& {1 O; b
- ### What we need ###3 R, N) n' N+ d2 h/ B2 E, a
- Naturally, we will need a MySQL server to store the data for us, this document
) _/ O' t+ d1 v2 C4 |* k% w6 z# J- Y - will not explain how this can be done - there are documents out there for the
' L/ B# Z9 e; o' s" |1 { - interested. The requirements include a (empty) database for TeamSpeak to use7 X5 y9 I4 k' ]7 k5 k. T
- and a user account (username + password) that has the permissions to do stuff, R& p0 w9 ]/ c
- with the database. Additionally, you will need a vendor library installed on the
" Y3 r; z3 J8 z' R+ _1 L - local machine, this came with my MySQL install.
1 Y4 ?7 H4 y) |; h* @ - These instructions will not tell you how you might transfer your data from the
- c# v, N# x4 F4 V4 m - SQLite database to the MySQL database, we start with a clean and empty MySQL# R" }2 E0 _% [3 A+ A! D1 F
- database.
& o' X5 R7 k* {" g3 S - Some users have reported ways to import a SQLite database into MySQL, but at$ [7 w! ~, w2 t0 y1 I
- the time of writing, there are still too many issues - check the current status4 o. ?7 F% u2 T* b
- in the TeamSpeak forums if you are interested.
. k* D8 f( w7 H0 ^/ @/ J - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 o% Z1 L* l6 H, Q2 X" S6 E$ d - Borland was used. This driver can only interface with the client library that
O- l' f1 `/ S! P# C% m - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. b% I. K; _" s. F+ Z - client library - basically all you have to do is to use a 3.x client library as
$ G9 h. m- @" n( t" M8 |0 D) ~ - "VendorLib" and a 4.x database to connect to.3 w8 r% r7 C( p3 o7 P2 [" {8 e
- If you need more info about dbExpress, you can contact Borland.
2 p( I& V i0 d) }6 m0 w
+ K1 Z' e0 z) @- A8 E- ### Doing the work ###
, Z* W4 Q0 I* T8 C+ l3 ? - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ R0 a4 b: A% t2 [, F3 a' g
- the perquisites right, just open your server.ini file, and add this section at
* x& A" o9 H- i* J) g: p1 g - the end:
$ @3 l$ }" k* ?* e8 {4 H; R3 a - ---cut here---7 g# H; X) S; i/ d# u8 J2 S
- [DBEXPRESS]
5 c9 ? ~# r9 K' T4 u/ E - sqldir=mysql_sql8 @3 o) U2 u. }) P) `/ y! H
- Drivername=mysql; _2 O4 A9 `' u* w c M9 L
- Database=Your_Database_Name_Here( `: k5 Z& [1 o' j. o
- Hostname=The_PC_the_MySQL-Server_is_on! `# w- ?. H$ F4 b
- User_name=User_name_on_the_MySQL-Server
4 O: C" ?' J3 `- \ - Password=Password_to_go_with_above_user_name9 J8 ^8 Z( D' j6 i3 ~) F4 I
- GetDriverFunc=getSQLDriverMYSQL
* P z! F j4 i. {$ } - VendorLib=path_pointing_at_your_mysql_vendor_lib5 W. l I9 C% X, `3 e1 I
- LibraryName=path_to_libsqlmy_libary
4 j5 t7 S( G1 ]! {5 M - Active=1
$ A: d: y+ R8 w; Y) o6 Q - ---cut here---6 \! c5 B9 X0 d& ], J; g
- In my environment (a linux box with a MySQL server running locally) I have:6 U: ~! Z. G) d! n. O% G
- ---example---
- D1 D7 P# u# N* f - [DBEXPRESS], P0 U' J/ Q" H u
- sqldir=mysql_sql
$ T4 A/ F" ~. p2 d* h. R& t - Drivername=mysql7 f3 R4 N# ~# U9 a2 N* t
- Database=test
/ l3 ?" }' J- j - Hostname=localhost- T2 s4 r1 `" [9 d6 S
- User_name=testuser m6 D8 _5 q* W: Y8 Y7 V/ n0 ]' n
- Password=my_password
" u: f+ D) e, L# G - GetDriverFunc=getSQLDriverMYSQL
# S1 w# T" u. i+ N) [) ` - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 h) {& \3 Z% d. N - LibraryName=./libsqlmy.so
' N' T U7 c! m; @ - Active=1* m% Y' G) q1 g `) x$ Y
- ---example---3 z. ]0 u2 i1 B! ~
2 O6 W0 z/ u3 t: x% ?- On a windows box, also running the MySQL server locally, it would be:+ T0 x$ e' Y2 p- i. p
- ---example---6 y+ M) r5 O" N$ S5 s. x- b5 m
- [DBEXPRESS]
2 w, A8 b( J" z1 d! V/ k8 J - sqldir=mysql_sql
" L+ g. J/ C+ P6 W+ d - Drivername=mysql' p2 ~$ }8 P3 e$ k! t
- Database=test
+ g7 q# l# T4 a. r0 `' E - Hostname=127.0.0.1$ y b- V3 _$ B$ Z. S' q. n _- r
- User_name=testuser
4 a. h, j7 n+ D# x$ @; o2 v, F3 V - Password=my_password
5 B; S; l" K: O6 j& @2 M' ^0 M - GetDriverFunc=getSQLDriverMYSQL
" }: d! z: \/ P- I - VendorLib=libmysql.dll
5 l; U! Z! Q l8 g) ] - LibraryName=dbexpmysql.dll) V" J- b1 S7 K# G
- Active=1
# r7 d* h* I7 e& B/ d - ---example----4 H9 \- W, o( _9 H% b% b9 H; ^
- - written 02.03.04 by pwk.linuxfan# `9 L' p% m: a5 G
- - D, ~1 N2 a! @
复制代码 |
|