|
|
麻烦翻译一下,下面这段文章:xhan . O+ g& D3 l' m! e! W
|: M2 s$ u( s; x- ! o3 u, E% b- O3 q1 N! {$ X H( s
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) u: T1 q* r2 r
- 3 r9 ~2 D* a* ~, Z' a( J
- ### What we need ###
6 S, Y: T8 O2 B! L7 ~1 }8 M) P | - Naturally, we will need a MySQL server to store the data for us, this document
5 k0 L& I1 z h" y4 W - will not explain how this can be done - there are documents out there for the
# L7 ^* A- i+ K# F( r, B& _ - interested. The requirements include a (empty) database for TeamSpeak to use
" x, ?7 q5 z1 `* f! Q1 u) s - and a user account (username + password) that has the permissions to do stuff) `6 I. q: T8 p/ M2 Y" M+ X) U
- with the database. Additionally, you will need a vendor library installed on the, {7 U; E9 v+ {+ D
- local machine, this came with my MySQL install.( t6 C: Z0 H) V$ B# C1 E' n
- These instructions will not tell you how you might transfer your data from the) k2 d3 g0 w% d. \3 R6 h; e
- SQLite database to the MySQL database, we start with a clean and empty MySQL' x- @3 E; n: A [% v
- database.
5 v4 L5 y* w4 t C/ Z5 J - Some users have reported ways to import a SQLite database into MySQL, but at
$ k8 |# B, h6 Y) S3 W- Q4 V1 V - the time of writing, there are still too many issues - check the current status
' o: h. k1 X, h$ J: _6 v - in the TeamSpeak forums if you are interested.
4 Z( r' }# |- C3 g: e! @1 ~$ d& Y - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. Z; p$ M+ Z/ e- H% |" } - Borland was used. This driver can only interface with the client library that
9 ~: h" D6 }$ Q1 t% n% n" z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- u( K" W; K9 t! T3 r# }6 ]% w
- client library - basically all you have to do is to use a 3.x client library as
" L* O" N% b0 I, u5 }: ]- s - "VendorLib" and a 4.x database to connect to.
+ r$ H& H: g, f" Q% ] - If you need more info about dbExpress, you can contact Borland.
* `1 i# H, R# u: V, v% O/ e
4 M% b- j& K8 k9 Y& Z# b9 C- ### Doing the work ###3 k, @9 b. i7 Q8 V
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all' S8 Y- N% O" v, W
- the perquisites right, just open your server.ini file, and add this section at
4 v' v' U7 i2 C9 V4 ^ - the end:! j' E1 D. n3 ]: V5 D
- ---cut here---
: p' S& ~0 b( q G6 j" l. V7 a; f - [DBEXPRESS]
1 J0 @5 Q4 v; O4 o6 ? - sqldir=mysql_sql: |' Q! a! S2 ~/ e
- Drivername=mysql
2 V/ G$ O) l3 B) N. m5 t3 } - Database=Your_Database_Name_Here# g, v7 p, g# v
- Hostname=The_PC_the_MySQL-Server_is_on
5 A9 U# M, Z) z' x* d - User_name=User_name_on_the_MySQL-Server
f! \" H9 W' ^2 {* Z8 L2 b - Password=Password_to_go_with_above_user_name
& U1 Q. A4 m/ _3 q' _ - GetDriverFunc=getSQLDriverMYSQL
; w0 R- h$ s! b; f - VendorLib=path_pointing_at_your_mysql_vendor_lib E" O ~ i0 x: c+ K0 y3 p
- LibraryName=path_to_libsqlmy_libary: }/ _6 h- @& [- a9 F( M( K
- Active=1
& A, W7 `) r3 }! g0 K - ---cut here---
Q# w' n3 @9 Y) u; A - In my environment (a linux box with a MySQL server running locally) I have:4 ~, ]& }+ K9 f0 o0 q
- ---example---; j; q9 M5 q3 G/ M& o
- [DBEXPRESS]
9 b$ Z$ o+ T0 G/ ]* _8 ]: x6 g - sqldir=mysql_sql
5 x9 C3 D/ A8 d" l! S: D - Drivername=mysql
; ]" l* |. a5 m s - Database=test
1 ]9 N) ^4 o6 [! q6 g - Hostname=localhost8 a+ ?$ g0 U$ | m M8 w
- User_name=testuser
, L9 p7 ]/ @8 j5 G" i - Password=my_password
: I8 I, h7 {- J8 {# v4 s$ a - GetDriverFunc=getSQLDriverMYSQL9 ?8 H8 w! ^. j) y" L7 `' ~
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" n+ N+ y, J$ [; d
- LibraryName=./libsqlmy.so, t5 s% Z+ e4 H+ P, S" g
- Active=17 J( r8 n8 d- K4 b. Z9 _
- ---example---
" s- G! |- i) G$ p
# z+ h8 A+ x; ]0 U3 J2 M: N: G! O- On a windows box, also running the MySQL server locally, it would be:1 g% ?- Z# c# H/ ^9 _- T3 Z# O# h
- ---example---
' C+ _+ T X* m& Y- c2 x - [DBEXPRESS]7 e# Q' T* f& _7 F+ X
- sqldir=mysql_sql
4 {& ]' j& n* T, J - Drivername=mysql) E+ ]/ U) `( X2 F
- Database=test
0 `7 i( z( _6 y" ^ - Hostname=127.0.0.19 P& e! q2 u# ?
- User_name=testuser8 J; Y) N* z6 p) q# n
- Password=my_password
8 _# C9 | T2 ?6 N. _ - GetDriverFunc=getSQLDriverMYSQL
( N f- v$ P1 J. s/ ] - VendorLib=libmysql.dll. G8 z; D- k% Y1 `
- LibraryName=dbexpmysql.dll& x1 ^: P% ^5 k# k1 P6 I1 _. p
- Active=14 d2 k3 ], L) l% Z, H' G- s
- ---example----
# k6 W# e# a. _8 x' | - - written 02.03.04 by pwk.linuxfan
" j1 W* A2 ` V2 K. j" |& D
1 W' c7 ]2 Q! E, H
复制代码 |
|