|
|
麻烦翻译一下,下面这段文章:xhan ! o. @& W( n) g0 N
, ?; ~# T+ g) \! H( M$ X
- 7 l2 h& _ h E [4 f
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
1 \0 q' y+ N9 \) `8 ~ - 3 ^% \0 L+ `% v$ U7 C( ~, R; f6 S
- ### What we need ###+ a# k/ h4 Y* _: R$ D0 l
- Naturally, we will need a MySQL server to store the data for us, this document
8 h( k8 V0 a% R$ L% K* q& `! j8 E - will not explain how this can be done - there are documents out there for the
4 x* {# j4 M0 W - interested. The requirements include a (empty) database for TeamSpeak to use
+ c& ]! f5 u+ U - and a user account (username + password) that has the permissions to do stuff8 T/ S) G) T7 L ?' P
- with the database. Additionally, you will need a vendor library installed on the' s( W6 h3 D9 Y* k" O! L/ d; ~
- local machine, this came with my MySQL install.# U! }% c6 W3 x9 u5 w1 J
- These instructions will not tell you how you might transfer your data from the
3 j9 W+ N4 j3 O! t0 [1 G( d! L - SQLite database to the MySQL database, we start with a clean and empty MySQL- C4 g# p, v/ n/ U" f% H
- database.
/ u. j' i2 m5 @* F# ` - Some users have reported ways to import a SQLite database into MySQL, but at
- s% _2 i0 \* p - the time of writing, there are still too many issues - check the current status/ }: H$ q* w) E1 y
- in the TeamSpeak forums if you are interested.
$ t5 M: ?) X" R/ q - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 g( v' J$ p. Y, D+ }
- Borland was used. This driver can only interface with the client library that - U3 J. M# T% N4 y, n, }, H
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
7 \1 }: ]! j2 X- y - client library - basically all you have to do is to use a 3.x client library as
) |! U: T1 X+ p. C7 k3 ~ - "VendorLib" and a 4.x database to connect to.
; a8 i8 n/ K' a& u/ V - If you need more info about dbExpress, you can contact Borland.
8 Z6 Z k9 l l0 S E
0 O# ?. V3 J+ z: D- ### Doing the work ###7 D6 p3 z' Z5 B8 r
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
x0 `5 a2 V( f8 y" V9 \" W - the perquisites right, just open your server.ini file, and add this section at" a% K2 a4 {8 M" n$ q V
- the end:: F3 O4 p! p3 D! l, f1 ]9 _6 l/ d
- ---cut here---7 R4 J" c \4 P+ K+ k+ G# q
- [DBEXPRESS]
" p! k6 `/ X. o* l - sqldir=mysql_sql
5 \3 `2 Q* Q7 [" p+ l4 ^3 W' |, [ - Drivername=mysql" ^: S# X" w9 F& o9 B ?: |
- Database=Your_Database_Name_Here
1 u3 x7 {& X I" P. d: v' w - Hostname=The_PC_the_MySQL-Server_is_on
& W/ [% q0 }# ] - User_name=User_name_on_the_MySQL-Server
: \+ \/ Q% s; W+ q& f1 J - Password=Password_to_go_with_above_user_name
: N* Z d3 I: J3 }3 \ - GetDriverFunc=getSQLDriverMYSQL
% A: [0 A0 e9 _; q - VendorLib=path_pointing_at_your_mysql_vendor_lib
0 Q0 @! l+ R# W/ d( W# ^ - LibraryName=path_to_libsqlmy_libary! U o! z) h. K5 M2 Z' P
- Active=17 L3 }4 s0 _' c& Z* [" K
- ---cut here---
/ Z* C9 e. o8 ^. Z - In my environment (a linux box with a MySQL server running locally) I have:3 \: U8 S& f' I- u$ B
- ---example---% M( o- e6 n; o
- [DBEXPRESS]9 U; Y" r% A3 p; ^1 R. t
- sqldir=mysql_sql" M" N6 y2 I4 V7 s$ o4 p! b
- Drivername=mysql
% q/ a' p6 R# I3 v# ~: d - Database=test( x1 Q* Q% A) O& P
- Hostname=localhost
: x& p6 Z2 d9 D% O8 a" G3 [# a, J4 F1 \ - User_name=testuser
% Z' b' {: G, ~6 f1 Q9 X# H - Password=my_password
# D" p9 q5 S' I" {4 w d! @ - GetDriverFunc=getSQLDriverMYSQL
) [; v# N( x* l8 M4 y- K( y, d9 x - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, B& \ A( O% k) ^. l2 v8 R - LibraryName=./libsqlmy.so) a* |1 y5 o' f. h6 g
- Active=1
# o# L$ j: l: U: p - ---example---% t, T0 V- s% {7 R
3 c& m5 J; J5 O/ K( @% N- On a windows box, also running the MySQL server locally, it would be:
4 u5 U' K6 m: H/ J+ Y! T - ---example---
7 [$ @* @, L3 r' C: Q) \9 F0 P - [DBEXPRESS]
3 D: o2 X8 _1 F! }. T - sqldir=mysql_sql
/ l+ H; R' d% l0 U- u, P - Drivername=mysql
% s) b/ z' W0 H# j; G% y7 } - Database=test
2 \& u$ t* m! M- x- R - Hostname=127.0.0.14 c. D5 M+ D" F( F
- User_name=testuser
) C" m# K% B- u1 D - Password=my_password: i- _- Z$ N8 g' ~
- GetDriverFunc=getSQLDriverMYSQL1 K7 C* C$ {3 e! s6 c
- VendorLib=libmysql.dll
4 g. [1 K+ I. Y) r6 J3 R - LibraryName=dbexpmysql.dll
Y% ]" e: ^5 Y1 D1 K. } - Active=19 g/ v' l9 \% s: S0 _
- ---example----
3 B$ T+ u V) u- d+ z - - written 02.03.04 by pwk.linuxfan
1 E6 d S/ F1 \ - 8 I" v% ]# f) H# @
复制代码 |
|