|
|
麻烦翻译一下,下面这段文章:xhan + ]+ u2 U+ e1 v7 \; P
0 b2 Q+ ?& C: X, U3 v; o/ j
- ) x- z$ V) e/ T0 ?
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 t7 l& _ Z; K) v! a6 J h4 ?
$ m8 E' ^3 w; m( M* M- ### What we need ###; ?7 C7 R2 K0 U1 J+ q" N
- Naturally, we will need a MySQL server to store the data for us, this document 3 P+ | ^ j. p
- will not explain how this can be done - there are documents out there for the
. T; _+ N/ r! u* r( D7 x - interested. The requirements include a (empty) database for TeamSpeak to use: F# T/ u0 s6 M
- and a user account (username + password) that has the permissions to do stuff; \( F' E/ B; f/ I& D
- with the database. Additionally, you will need a vendor library installed on the( c; P% O) w- G+ S. I9 }( G3 i
- local machine, this came with my MySQL install.( k' n# [: ~( }* Y) |
- These instructions will not tell you how you might transfer your data from the2 W- H1 T) W: j2 C
- SQLite database to the MySQL database, we start with a clean and empty MySQL/ m* f9 G' G" D6 @; m! B
- database.- w* S- q- [) Z" u V$ G; p" y
- Some users have reported ways to import a SQLite database into MySQL, but at& d! V. x1 W; K: J4 i# b l2 `
- the time of writing, there are still too many issues - check the current status |5 b ]( X! i+ P% {
- in the TeamSpeak forums if you are interested." I1 `9 l# G# K6 m
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
) P# t8 m r+ u: c0 d" X$ c - Borland was used. This driver can only interface with the client library that
) k* J; s: T# p# g9 U8 U; C$ E - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
" j( C4 F( ^" X _! F3 g0 ^ - client library - basically all you have to do is to use a 3.x client library as - L5 s: U! k% y+ w) | `
- "VendorLib" and a 4.x database to connect to.
0 o- C8 U* N$ @& \, J: s% Y - If you need more info about dbExpress, you can contact Borland.
g6 O2 }. _6 {. G. |
2 ?, ^9 u# U) o* r+ C- ### Doing the work ###. b# Y2 G+ }. [& b
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 }# q2 [6 _& u4 N
- the perquisites right, just open your server.ini file, and add this section at% g9 }" _! s7 _5 ^. n' r J( Q: m
- the end:
% J: K; W" U L" d - ---cut here---
. h/ ~' I7 Y% A/ O" g* x - [DBEXPRESS]
. k7 ]0 }' W2 [! i% ?4 d# r, Z9 Y - sqldir=mysql_sql$ ^9 p. |5 F; [- P8 J* H
- Drivername=mysql' v2 S4 }/ M" a+ c
- Database=Your_Database_Name_Here
9 E& G5 J1 d9 b( {( q - Hostname=The_PC_the_MySQL-Server_is_on
8 y ]: q& }6 N4 Y/ t( j - User_name=User_name_on_the_MySQL-Server
( {& }- v4 f, M) B5 l# v" _8 E - Password=Password_to_go_with_above_user_name
7 l+ _( ^, X1 d - GetDriverFunc=getSQLDriverMYSQL B& p& b! M$ ~) v6 T# y7 i
- VendorLib=path_pointing_at_your_mysql_vendor_lib
" `% W$ j" S/ G# X: O; U - LibraryName=path_to_libsqlmy_libary
/ |9 N3 `7 v% l. W - Active=1
' y+ \( d; g* W, [7 y) t - ---cut here---
/ t7 q9 P5 v, f. N: p - In my environment (a linux box with a MySQL server running locally) I have:& U N, h0 X* \" E
- ---example---- i; d# h) A- }6 Y7 H
- [DBEXPRESS]) ]2 j$ a; P( @; J
- sqldir=mysql_sql
+ } l0 F) n, y: H1 O - Drivername=mysql
" f. I- I" ~- N - Database=test7 h4 |2 U" C8 n2 Q2 W4 |/ R
- Hostname=localhost# L$ a8 n; s" `: Q D3 i' V/ W
- User_name=testuser, m) n7 A& M/ f) F- Y
- Password=my_password& K' i: |7 O2 `# P/ c
- GetDriverFunc=getSQLDriverMYSQL$ N2 R) Q3 a" Y9 L2 @0 K+ c% j+ C
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ S# j* F) r) \% B- U1 i
- LibraryName=./libsqlmy.so
7 S+ S: ?( L! X A - Active=10 @9 m* R7 v! D b
- ---example---3 q6 t) D2 @, h! q& z/ J; V
4 ]: t# J5 K6 W) w" C; U- On a windows box, also running the MySQL server locally, it would be:
6 r3 T8 z7 t p! \ - ---example---
3 A4 B8 e7 R7 v - [DBEXPRESS]: x- }2 g& D) M
- sqldir=mysql_sql+ g. u5 j6 I! x" S$ E2 o$ L. [
- Drivername=mysql6 [2 q6 |' Q) B. E* Y1 B7 \
- Database=test. |5 v, `' D2 I: V
- Hostname=127.0.0.1
: H! \( p6 j | z - User_name=testuser: l9 ^9 D$ X3 Y7 b6 V+ s
- Password=my_password! G2 w; A" b n/ a2 P/ v
- GetDriverFunc=getSQLDriverMYSQL
3 y" |. y3 c7 p7 L5 B - VendorLib=libmysql.dll5 G, ^- J; |! ^! k
- LibraryName=dbexpmysql.dll1 [& x' L* W( V. Q+ @
- Active=15 j0 B# ~( K' } u
- ---example----
; H5 P' A# ~- M$ _7 r. Q' s7 o# P - - written 02.03.04 by pwk.linuxfan
! ^% @0 o3 `/ a9 h4 p) p4 H
, \" U1 E/ U! p
复制代码 |
|