|
|
麻烦翻译一下,下面这段文章:xhan ! `: Y$ K K9 Z( D; j7 i+ B. R
2 \" c f( E' h: a, H( Y7 g
- ' X- y* @/ K; E- {
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######& z5 A1 P7 a! Y
- D6 Q6 r' @) m! x: q3 d- ### What we need ###
0 b; ?4 T2 e: o, U$ f( \ - Naturally, we will need a MySQL server to store the data for us, this document 6 G' i( P* ^2 p) v/ B8 f
- will not explain how this can be done - there are documents out there for the
, @" _, m* V8 I- z4 O - interested. The requirements include a (empty) database for TeamSpeak to use
: x& [2 z. V6 s" N: E, W# N - and a user account (username + password) that has the permissions to do stuff0 C! I0 b* ]4 h: o7 ?' Y5 o
- with the database. Additionally, you will need a vendor library installed on the
: b3 x% g2 P Z7 i" _ - local machine, this came with my MySQL install.
7 W& K3 g' `2 i; M3 K - These instructions will not tell you how you might transfer your data from the
* v2 v7 e7 u0 k* _4 R - SQLite database to the MySQL database, we start with a clean and empty MySQL/ e+ {! m1 q I+ v, i$ u; g
- database.
! G" B% Q/ ?8 D8 g) H+ b' @) N$ a" S - Some users have reported ways to import a SQLite database into MySQL, but at
; j" |. D1 H5 ^ - the time of writing, there are still too many issues - check the current status
* n9 P' a8 \. C: V, H( l. k6 ^ - in the TeamSpeak forums if you are interested.2 r' r) e: e/ W' e3 ~& F0 l" Y, {
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 z [0 l. ^9 T; B% ~* `
- Borland was used. This driver can only interface with the client library that
( F' o7 m8 D8 I, O9 t/ d- Z, k - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 p, `8 u- N; O8 I- t0 ~) O - client library - basically all you have to do is to use a 3.x client library as
, K' @/ ?2 M# E1 O; h2 e' p/ } - "VendorLib" and a 4.x database to connect to.
o' P. @+ R: B& y+ i - If you need more info about dbExpress, you can contact Borland.
6 M6 |$ Y6 E( c. E, ?8 w3 F
- ^% o" V) F7 Y+ o; @- ### Doing the work ###0 @# ~9 n. s$ Y8 a6 H
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 C- `% S# q3 w4 K6 |. N) E
- the perquisites right, just open your server.ini file, and add this section at
4 W# D# M) N( E0 u9 x1 M - the end:0 E* v& w, x0 @5 Z$ K1 p; s
- ---cut here---
, q$ F" h }9 G0 K+ [1 P! p9 M+ c - [DBEXPRESS]
* L9 a3 Q( X9 N7 _6 b; ?5 o2 w - sqldir=mysql_sql
) y. U' y) M, a7 V - Drivername=mysql
! t& P1 V! l1 j. ]+ i% K) k9 ?* p - Database=Your_Database_Name_Here6 i5 A% _' G9 \: g1 R9 P* ]( j
- Hostname=The_PC_the_MySQL-Server_is_on
: L' ]/ r) D2 w - User_name=User_name_on_the_MySQL-Server! \, P$ ^" M0 d4 @9 u$ U% E
- Password=Password_to_go_with_above_user_name1 E; q) e$ G- a5 d/ B, b" E" r- R4 L
- GetDriverFunc=getSQLDriverMYSQL- o3 L6 {2 A5 ]2 C& n" T
- VendorLib=path_pointing_at_your_mysql_vendor_lib. X+ F/ s4 w4 O) e
- LibraryName=path_to_libsqlmy_libary' d ^: _( X9 |( l* }6 r. r' n8 s
- Active=1
" b9 T! B, J! f7 T: p5 ~2 U& N - ---cut here---
, ]) D; W9 d7 s( ]$ J, x# K - In my environment (a linux box with a MySQL server running locally) I have:
, s3 N! p/ n/ ?! _ - ---example---+ u! c1 w4 x8 g. y% Z' N; V
- [DBEXPRESS] K3 Q8 ]1 V8 A4 R+ ~* m: l
- sqldir=mysql_sql. V! y8 m1 j0 p; N# j
- Drivername=mysql# j9 `9 f; `( z5 e3 |% {
- Database=test
1 D: ~( \- m5 B6 g' K/ H - Hostname=localhost2 Y; U4 U9 B2 P0 s! N2 a; K. |) ]
- User_name=testuser( Y4 Z! z" h" X5 B9 v* c1 n
- Password=my_password9 |# |, e6 a% G! M7 J
- GetDriverFunc=getSQLDriverMYSQL' c# s* w3 |( H: v% k
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
0 D% f8 \6 @, n7 ~" W - LibraryName=./libsqlmy.so
$ N' F M4 `- V9 l# S" Q! L5 | - Active=1! R {- v+ S m# f5 r
- ---example---$ ~# z" B3 D, p5 W, L1 |
) Z8 M! b7 `7 W+ g! h- On a windows box, also running the MySQL server locally, it would be:
9 U2 P9 W; ]- M - ---example---- z: @$ j; m' |
- [DBEXPRESS]3 w7 r* R0 y9 j/ u- ^. g' u
- sqldir=mysql_sql& T9 G! I, V% }! I. B/ x) @, l" K
- Drivername=mysql
: \3 {" |0 `! Z - Database=test
6 t v, U) A5 y6 v - Hostname=127.0.0.1) `2 X$ X9 n! u; g$ Z8 B
- User_name=testuser
. `" C2 F$ N8 [ - Password=my_password1 x" M8 e" x1 I7 f; o. w
- GetDriverFunc=getSQLDriverMYSQL
0 ?$ J% B6 E# T* t - VendorLib=libmysql.dll, k: ~( e1 R; T$ ?: ?
- LibraryName=dbexpmysql.dll, P4 C1 M6 D6 I3 [6 ]
- Active=1
0 t/ z; @7 q4 q# Y$ _6 D2 ] - ---example----
' `8 k# L6 J5 a9 j; d - - written 02.03.04 by pwk.linuxfan$ r# h# U/ Z+ T1 q& N6 C q; X' T
- 6 w& g1 C" Q. O6 ?2 l& l1 Z0 _4 e
复制代码 |
|