|
|
麻烦翻译一下,下面这段文章:xhan " e2 M8 U7 n8 E% ^3 Z+ v
: ^# P" C. T" G" W, M1 W6 U$ Z( j6 J- * N0 q# S6 {$ v) o3 H B. S+ ~
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 J8 z1 n' v5 x
4 Q# K( A+ B$ Q! u- ### What we need ###( l8 @( p: ~- k/ l
- Naturally, we will need a MySQL server to store the data for us, this document 9 ^- k& ~' G7 O$ w* {
- will not explain how this can be done - there are documents out there for the " M' N) ^; v( `; V9 ?
- interested. The requirements include a (empty) database for TeamSpeak to use
9 W, |0 M7 D6 Q - and a user account (username + password) that has the permissions to do stuff) P- ?1 P2 P- v( `5 Z
- with the database. Additionally, you will need a vendor library installed on the" V- P, h5 D: O: }) T: [( d
- local machine, this came with my MySQL install.
. y! s; a ]' q# G - These instructions will not tell you how you might transfer your data from the8 K% K' S% w( O, z: v
- SQLite database to the MySQL database, we start with a clean and empty MySQL
" T( u& G$ `1 t0 h( ^' K: d* N - database.6 v5 _2 J9 n8 Q; f( h" i( u
- Some users have reported ways to import a SQLite database into MySQL, but at1 A* Z. O& j& y1 H4 {
- the time of writing, there are still too many issues - check the current status$ u) n9 k T9 B& s j
- in the TeamSpeak forums if you are interested.
7 O6 y- U" l1 g3 V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from" s# s8 u! a i* i( p
- Borland was used. This driver can only interface with the client library that
$ ?! P/ p) W" f& V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
; u8 A7 R; r7 i# ?, c9 z - client library - basically all you have to do is to use a 3.x client library as 3 y4 } G# n! N4 ]4 Y6 `6 U, ^ C; j
- "VendorLib" and a 4.x database to connect to.
5 `: }) P& N } i5 V% l* \ - If you need more info about dbExpress, you can contact Borland.
9 F; @) `2 \/ I- p1 ]5 c6 O
8 b: R9 {' |/ d5 I; A$ b- ### Doing the work ### t3 w9 F# x( U, r" s) s0 ?
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all, ^ A/ v+ @9 m
- the perquisites right, just open your server.ini file, and add this section at4 G1 f, N7 x. ^8 V
- the end:
N/ \" m2 ^) `* G - ---cut here---
: Y1 Q* f0 ^$ q - [DBEXPRESS]: v% x/ _3 E0 H4 Q1 {. I
- sqldir=mysql_sql
8 x" h9 ~7 r8 w/ } - Drivername=mysql8 u( y/ [3 ~8 {8 M& d: m5 m
- Database=Your_Database_Name_Here
- O e% X r9 S- q9 P - Hostname=The_PC_the_MySQL-Server_is_on
, F. V+ _) n) V( P: O - User_name=User_name_on_the_MySQL-Server
9 v& }) J" B8 u - Password=Password_to_go_with_above_user_name8 _/ q5 H0 m1 ]% u% {5 T6 X/ x. X
- GetDriverFunc=getSQLDriverMYSQL
) K( q5 O/ O4 ?" W/ f- C - VendorLib=path_pointing_at_your_mysql_vendor_lib
& A6 p$ ?' z! r5 w# W5 `$ r& q$ A2 b - LibraryName=path_to_libsqlmy_libary4 b( K' {5 F0 L) m
- Active=1
7 G1 f- G6 \' e r* u - ---cut here---. K2 R! r8 M+ I0 S" i
- In my environment (a linux box with a MySQL server running locally) I have:7 c s# d7 I& J1 W7 V9 o0 g, A/ n
- ---example---
: ^$ w, p M7 `$ c - [DBEXPRESS]8 }9 k) @$ S" P' Z6 {, x
- sqldir=mysql_sql
: G5 u# g; _ m0 a! s# | - Drivername=mysql" T# ^3 ? p4 W/ z6 Y7 K4 s% Q
- Database=test0 n5 O0 `6 o+ b/ ?9 E
- Hostname=localhost
8 R2 y- w6 q4 y - User_name=testuser
3 V; b8 ]8 v$ {# T/ O4 d - Password=my_password' n9 O& |# L5 q1 V) M
- GetDriverFunc=getSQLDriverMYSQL
: Y' \* `0 Q3 f; l) Z; ? - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ b" u) N* ]5 G7 y& o
- LibraryName=./libsqlmy.so& A" t5 q9 U4 G! _& R+ I1 I8 t
- Active=15 s: R' V2 B8 n+ T
- ---example---
( \# L, j4 `- P! F- V& Z: Y4 q - $ J6 W+ X6 {" \
- On a windows box, also running the MySQL server locally, it would be:: P* n* Y' T n8 {' U' _
- ---example---9 I5 o: F- f j0 |9 I8 T1 R
- [DBEXPRESS]' O3 P8 u; r! } C7 |; b
- sqldir=mysql_sql, m4 h0 W& @9 O
- Drivername=mysql8 a3 f2 L6 l' v; K
- Database=test6 D2 q8 k+ @" N7 E
- Hostname=127.0.0.14 M2 R6 p7 Z3 ~, C( u& Z' e
- User_name=testuser* J$ A H4 F+ g7 m p% ^
- Password=my_password
$ o! M- {8 e: m5 d# [- _ - GetDriverFunc=getSQLDriverMYSQL9 u6 Y5 ]) S# t. Q
- VendorLib=libmysql.dll
( j$ l" V+ z, ? - LibraryName=dbexpmysql.dll
7 o% F1 k+ |- ~ - Active=17 |) O. K& F) `) G4 x5 K/ B
- ---example----
0 b! X9 O/ E2 d8 ~& Z9 Z* b6 B0 K - - written 02.03.04 by pwk.linuxfan
7 Q, ?1 B# u( N& M0 Z
" r& v2 y( Y, U) W& H
复制代码 |
|