|
|
麻烦翻译一下,下面这段文章:xhan 8 H R: W* T" [# P8 U: D- @( n; q* c
0 F/ Z, d* k7 M# l" V# c; K v
- 6 y" J L' k5 Q! V% L- k( r
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######% G M, U4 n1 A! @! z0 G% c+ R
- 7 M6 D. L$ w: g5 H* g# U6 x# }8 B. W
- ### What we need ###) j( u+ G* G7 Z9 y: B" D+ ^
- Naturally, we will need a MySQL server to store the data for us, this document
9 h0 i7 t6 H0 Y9 D; h - will not explain how this can be done - there are documents out there for the
% o0 d3 t8 L( r* z$ J - interested. The requirements include a (empty) database for TeamSpeak to use
7 V& J( P- X6 F, G c2 ^# @0 D - and a user account (username + password) that has the permissions to do stuff* o* {' j5 S2 c$ m+ M* o+ T3 [
- with the database. Additionally, you will need a vendor library installed on the7 {- {+ |3 I) k1 G5 d
- local machine, this came with my MySQL install.
9 ~& n2 {0 W, j - These instructions will not tell you how you might transfer your data from the# c7 I5 V2 l: j3 Y, ]0 }
- SQLite database to the MySQL database, we start with a clean and empty MySQL
" T! p% t% L. M& I) P- j - database.
, i6 k \: |1 H" n, s8 E% }' Z - Some users have reported ways to import a SQLite database into MySQL, but at1 D* d3 ^" U& k" j" ~6 B
- the time of writing, there are still too many issues - check the current status) o# Q% f# D/ D1 r4 z& w f
- in the TeamSpeak forums if you are interested.
. V; |; a; g- g) C7 S - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
5 y( [9 x/ `( w& m9 j - Borland was used. This driver can only interface with the client library that & ^3 X, Y& s2 o! B/ `$ x' F' f9 a
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 U8 r! X5 c! }5 X5 ^! X - client library - basically all you have to do is to use a 3.x client library as 8 g- W8 _- V7 e8 C4 B( n( x1 y* U
- "VendorLib" and a 4.x database to connect to.
2 N n I, U9 E- `) U: M2 ` - If you need more info about dbExpress, you can contact Borland.
' T3 S* @: a6 |9 [# p2 X h5 e - : [0 [* }) ]" I9 _5 q1 b
- ### Doing the work ###/ X1 S' y& d' W/ E: ?+ z; w
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# T' e7 E0 L. j+ I2 N/ Q. o - the perquisites right, just open your server.ini file, and add this section at4 h& b4 h! n+ E9 P( U
- the end:8 Q+ _6 o/ `8 m6 n
- ---cut here---
2 P( p( b- |: f' d Q) U) n% Z - [DBEXPRESS]
* b# R6 Z" g! G7 I) B - sqldir=mysql_sql
# H v# Y* u: d) G8 f - Drivername=mysql
" W; H) q5 j& Z. Y4 y- y( ^ - Database=Your_Database_Name_Here7 W4 P; y, p) _4 B( ]
- Hostname=The_PC_the_MySQL-Server_is_on( I1 x" i j" c7 S B6 q d
- User_name=User_name_on_the_MySQL-Server. E' m1 x1 @6 U2 |
- Password=Password_to_go_with_above_user_name
c- a& B; z( ] - GetDriverFunc=getSQLDriverMYSQL
" b* L5 W8 `9 o: E4 N* _ - VendorLib=path_pointing_at_your_mysql_vendor_lib. M, f/ h/ T4 W* H
- LibraryName=path_to_libsqlmy_libary$ q! B9 ~- s- y% l
- Active=1
( d$ N D1 u/ R - ---cut here---1 _7 K9 I; e8 }' z2 Q/ M+ C6 z
- In my environment (a linux box with a MySQL server running locally) I have:
6 A! e3 _( S. E* { - ---example---) Z% V9 N, d* ~$ u+ A! Z
- [DBEXPRESS]
3 v& ^6 s7 y0 Q+ f( T' s% W - sqldir=mysql_sql0 u1 ^' l# B+ @3 M: Z4 p6 b
- Drivername=mysql
6 ^# j$ y/ ~! e; f - Database=test
. s8 i1 f, z) _ - Hostname=localhost2 {% T! g; S4 s& ^1 w
- User_name=testuser
1 H! @0 |3 r" d/ D- d# }" v - Password=my_password9 B, U. b* f7 b: c# T1 Z! S
- GetDriverFunc=getSQLDriverMYSQL5 C" |$ [/ j7 R6 ?8 b( \2 Q" M
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 D9 [2 v9 V5 |1 a5 T( \, [. @
- LibraryName=./libsqlmy.so; i- i6 H% t# C& T
- Active=1, O+ G9 p5 J4 k) D7 ?% L9 _! o6 a
- ---example---
9 D [% u$ l; B/ M5 W) r - 8 l1 h+ }! P5 d6 ]
- On a windows box, also running the MySQL server locally, it would be:
, I% V. Q" Q; e9 [ - ---example---
& s, [# U, o8 \1 U4 O+ \ i7 @ - [DBEXPRESS]9 ~3 d7 R) i$ n+ {
- sqldir=mysql_sql
) |7 M: [- U: ^ b$ j- c - Drivername=mysql* U' x/ f7 j: F4 k& U% o* h# l
- Database=test* N* g5 v* g9 n
- Hostname=127.0.0.16 b" f1 q/ @! D7 ?& i
- User_name=testuser' A3 \8 A+ l( K: U
- Password=my_password, i0 l# L$ A( k9 y7 v
- GetDriverFunc=getSQLDriverMYSQL8 v8 A7 l& H2 H
- VendorLib=libmysql.dll0 J) Z" ^ ?2 n4 K3 h
- LibraryName=dbexpmysql.dll& b$ `7 f# K: e+ d! s% {$ {/ D' X6 E
- Active=1
$ P1 Q; A" n: Q5 g! I+ X - ---example----
1 R1 H& G, ~+ R2 v1 J+ ~" m& Y( k - - written 02.03.04 by pwk.linuxfan
5 H& d) K$ w- f+ n- W/ s
# f3 c5 z0 A9 v
复制代码 |
|