|
|
麻烦翻译一下,下面这段文章:xhan 4 v4 U* s3 Y# w/ ^1 j4 w
( M8 g( H7 T3 N: o
-
( A( l- K: ?1 L: w* r - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######3 `* I* v. x0 |3 n- t) N2 e% g
! _8 l6 C1 ]0 @: _$ o- ### What we need ###+ f' A( J* m6 ^, X- E1 I* ^
- Naturally, we will need a MySQL server to store the data for us, this document 8 L+ [, u2 z- k# y, T; F
- will not explain how this can be done - there are documents out there for the
3 }' ?& f7 h- S7 ]$ o; G - interested. The requirements include a (empty) database for TeamSpeak to use
9 W* V7 P9 }9 Q9 i2 U( V4 E - and a user account (username + password) that has the permissions to do stuff
0 Q, A. ]5 y' a% C: K9 a; l( X& e - with the database. Additionally, you will need a vendor library installed on the
' q+ n5 P1 i2 v# r - local machine, this came with my MySQL install.- `1 Q3 w, p9 D4 O2 ]5 i% \
- These instructions will not tell you how you might transfer your data from the
6 i, ?# \& V# O" Q2 i - SQLite database to the MySQL database, we start with a clean and empty MySQL5 U8 e% R. ?' {
- database.7 h- m" ^ D8 a
- Some users have reported ways to import a SQLite database into MySQL, but at% U2 x0 s4 D: a
- the time of writing, there are still too many issues - check the current status
2 y2 ?- C* w w6 N x - in the TeamSpeak forums if you are interested.
& X, B: ^1 W; y& W" ^; b+ V1 Q& _: u - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from- S1 T4 r a9 P+ D& U: D
- Borland was used. This driver can only interface with the client library that
; T, w1 o" u+ [+ p9 h% b/ }# `! Z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 ?7 R; k" G V/ @
- client library - basically all you have to do is to use a 3.x client library as + a1 U' ~$ G0 Y* @( K A( X
- "VendorLib" and a 4.x database to connect to.
( b& w+ L3 v3 o5 C - If you need more info about dbExpress, you can contact Borland.4 A& o* B' q8 p$ j) y" j7 M
" d+ H) Y7 e; x5 j' @1 R- ### Doing the work ###
( v0 ]: T$ f, A% ^! u5 K - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all4 h l7 k( u6 N( f3 F* B
- the perquisites right, just open your server.ini file, and add this section at- V8 k6 d+ `/ S% {4 k3 ]8 |
- the end:
6 m. N+ C2 _2 K" \* K8 L. m - ---cut here---
b5 Y, x! R. S - [DBEXPRESS]& S( j Y" a: C3 q) _ p J
- sqldir=mysql_sql
4 V" |6 t' ~/ Q d - Drivername=mysql
! w) R1 L+ I: c$ N: n$ h - Database=Your_Database_Name_Here
2 J. W0 q8 H# C) d - Hostname=The_PC_the_MySQL-Server_is_on! g3 K7 p, N7 M W
- User_name=User_name_on_the_MySQL-Server' v* k$ I* D8 t, n7 k3 i9 s
- Password=Password_to_go_with_above_user_name
9 _+ ?( M0 P X5 g - GetDriverFunc=getSQLDriverMYSQL
( f$ c/ ?- n2 _/ f. g - VendorLib=path_pointing_at_your_mysql_vendor_lib; B2 M: v6 D" k9 M, @' O
- LibraryName=path_to_libsqlmy_libary, f2 f+ J t% g( g7 e* o# j
- Active=13 }8 g' ?6 Y- Q8 V6 B
- ---cut here---: Y+ o+ f" H" `& A/ u' r
- In my environment (a linux box with a MySQL server running locally) I have:
& w9 U3 {# l- J9 } - ---example---9 Z! ` {1 B; {! Z" r5 o* s4 P# O
- [DBEXPRESS]5 V+ o9 W+ W" t* r8 a
- sqldir=mysql_sql0 X' q" v9 d1 j& ~. e! ~. t
- Drivername=mysql
' ]5 z) N1 K# C- ?$ H3 r - Database=test
0 {8 q, G5 _: S' Q7 z5 Y8 n - Hostname=localhost
4 A* Y$ \' [1 _& Z - User_name=testuser, Q) w7 Q& V6 d8 d" [" E1 e
- Password=my_password$ {7 ]3 r2 v' v. J
- GetDriverFunc=getSQLDriverMYSQL* q) \ T0 T) S% Y7 e& i
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0+ `. m ^+ ?( {- e9 k+ l% ~
- LibraryName=./libsqlmy.so
7 x- E5 H0 V2 p1 B t8 u6 Z) D8 d. Z' w - Active=13 O2 r7 x# a# {- w; K
- ---example---" s: o Z5 i) @/ C: o
7 B- m W, ^; X' G% R3 M- On a windows box, also running the MySQL server locally, it would be:
8 H, P: d" E5 { - ---example---; V- K% }9 d m
- [DBEXPRESS]* w! M( N# K* K, m7 R+ W
- sqldir=mysql_sql; Z) c! C; N# ^2 M* N
- Drivername=mysql
) v' ^' v) K J8 z+ a( o - Database=test
0 A+ R/ N$ D# m3 C6 u - Hostname=127.0.0.1
4 a% C% H& m0 h$ [2 Z - User_name=testuser
2 s: _) S1 U$ C& k+ k$ \: j - Password=my_password
9 z- }% f z. Z' U% w4 V+ Y - GetDriverFunc=getSQLDriverMYSQL
0 H& Y! G) n6 u+ P$ ?& n9 b% ]2 f - VendorLib=libmysql.dll
. V. ^; c3 _6 n; \ - LibraryName=dbexpmysql.dll5 x- ?- y5 c6 q/ I! v! G
- Active=1& a' a- x7 x$ q( Z
- ---example----: ~. m9 I( R% R4 |: M1 R$ e
- - written 02.03.04 by pwk.linuxfan
4 }7 g8 e9 m" G' U8 P* B
% t7 \" O, o& a2 w Y
复制代码 |
|