|
|
麻烦翻译一下,下面这段文章:xhan
: d; B3 s, _ }& ~3 C
3 n- d6 {4 B3 U1 p! V2 T/ ]-
( n( q2 D& _/ }& W3 y1 J - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
6 z$ |) N7 ]( l: w! A: [
; A. `) C8 T2 N- ### What we need ###
- t8 ^7 i; r& K2 [0 k. Q0 R& d - Naturally, we will need a MySQL server to store the data for us, this document 6 F5 Y) v0 g/ {: `3 N- F8 f6 L
- will not explain how this can be done - there are documents out there for the 5 ^) b r! P. t5 o! v
- interested. The requirements include a (empty) database for TeamSpeak to use$ n: k. J3 j# D' |1 K8 i4 }
- and a user account (username + password) that has the permissions to do stuff
$ H1 Y- {6 a2 O - with the database. Additionally, you will need a vendor library installed on the
/ g% ?4 |0 }; b. `% w - local machine, this came with my MySQL install. V& {0 C j6 f# Y: ~) s
- These instructions will not tell you how you might transfer your data from the/ X8 s! T. f/ }& {
- SQLite database to the MySQL database, we start with a clean and empty MySQL0 A! w G* Y2 e8 D" T4 I6 U6 M
- database.5 m0 V) k% O9 m; f; Q6 l; g
- Some users have reported ways to import a SQLite database into MySQL, but at0 ^/ Z5 q+ Y7 x0 V
- the time of writing, there are still too many issues - check the current status6 F/ [9 i& V+ b3 o
- in the TeamSpeak forums if you are interested.6 Q; S+ @" m% W# t* P
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. F' H( M) X$ ]( ^+ y2 a - Borland was used. This driver can only interface with the client library that
: N6 O7 _( a( ~3 L5 L: R: h# I - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 A5 ?* W. P2 I4 c$ ]7 F/ M
- client library - basically all you have to do is to use a 3.x client library as 6 h' P& ~3 D$ e! v
- "VendorLib" and a 4.x database to connect to.; }1 u" r: p5 K
- If you need more info about dbExpress, you can contact Borland.
5 i% q. X% K) H: f* M5 p. Q) T4 } - 8 F4 ^" E" O, n
- ### Doing the work ###; Y& ~7 _4 [$ l5 B. Y
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
+ {5 p& h ~" s: E7 G - the perquisites right, just open your server.ini file, and add this section at
6 ^: t3 C; _$ v7 G* a. Y) l8 } - the end:
# Z* ^8 M W- Z! n/ G5 z- n - ---cut here---8 E& ~+ v0 N8 B' C X+ A
- [DBEXPRESS]
# L5 |" [9 M; _; d6 ]- h - sqldir=mysql_sql
0 c" J9 b: X( c; v& } - Drivername=mysql6 V$ X6 u9 l' e( g! N- @) {0 \
- Database=Your_Database_Name_Here
. \# {6 A/ |( F2 T$ L5 C) ~9 Y - Hostname=The_PC_the_MySQL-Server_is_on
. E5 e0 t) @& k4 ` - User_name=User_name_on_the_MySQL-Server
H+ \8 y# X' Q8 I" `6 o: w) u0 { - Password=Password_to_go_with_above_user_name7 Q9 Y" A. c" s7 `2 o \, Q0 X
- GetDriverFunc=getSQLDriverMYSQL
. e8 z% G# t8 Q3 N - VendorLib=path_pointing_at_your_mysql_vendor_lib" I8 ]1 G; O" o0 S, }' k
- LibraryName=path_to_libsqlmy_libary
& q) i0 H4 p8 I! b2 m" r% c - Active=1* f, H& a2 a. @* Z
- ---cut here---
6 G$ w. D @& A8 A! N - In my environment (a linux box with a MySQL server running locally) I have:3 Q2 _( b& b L. a% U
- ---example---
d$ v! S$ M$ V2 j# \+ G e8 r - [DBEXPRESS]0 T: k: {* d& Q4 p
- sqldir=mysql_sql" t+ O [8 P( X5 l8 W
- Drivername=mysql
! S5 P5 U! h# g/ _# q - Database=test
1 r/ j9 d. t0 V - Hostname=localhost, a" y- w9 v1 E7 w
- User_name=testuser
" c4 J7 `% V: B - Password=my_password+ d$ c5 a+ t$ {9 d" F1 A# k; ~
- GetDriverFunc=getSQLDriverMYSQL8 ^. `+ ?/ L! i
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.00 Y/ ?2 d" \! r
- LibraryName=./libsqlmy.so$ x" C1 Y8 ^! [9 G) I) x
- Active=1
/ m" ~$ G' @1 s( G7 H - ---example---
7 v8 b8 k6 H7 N6 N
/ X- b0 N4 c1 O9 I- On a windows box, also running the MySQL server locally, it would be:
6 j1 P5 h) A& K+ Z" s3 x - ---example---: M$ {# ?' Y+ u! `# |8 U- M t/ K
- [DBEXPRESS]
7 u" p5 s3 f+ \1 h7 j# H2 ~- W9 p5 d - sqldir=mysql_sql2 B1 l8 o ]( b* {9 M% W @
- Drivername=mysql, X, d' ]8 x4 U9 b
- Database=test
! I& g. G: W/ P7 @& h- V, F2 |9 a - Hostname=127.0.0.1
# M% [2 g" I1 n* I$ v3 W - User_name=testuser
1 C; p* ^3 g" Q% u - Password=my_password* L$ r3 d" b* F. { q3 R
- GetDriverFunc=getSQLDriverMYSQL! y# L( i/ e( N
- VendorLib=libmysql.dll
- r4 D0 X# t; A' e! Y - LibraryName=dbexpmysql.dll9 W8 I3 S- w( \0 R/ i" T5 B
- Active=1
, p. |8 f+ }" \2 F, b - ---example----% I" {1 _( E' P9 J: e
- - written 02.03.04 by pwk.linuxfan
5 i+ {$ L" f! ^$ y - 0 U, b) @3 k5 G& T
复制代码 |
|