|
|
麻烦翻译一下,下面这段文章:xhan ) l; ]$ I) C7 s b. g7 n9 e
2 d$ A# j L. \( N3 E4 z-
2 h. U& \+ c/ O/ y3 ^, G/ l( a - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 z6 E9 W, q' l4 v2 ?& M
- . {3 ^/ u+ R# M4 [5 N
- ### What we need ###
! f: o9 t' @' ] - Naturally, we will need a MySQL server to store the data for us, this document % ]6 k" J- Z' w7 y# E
- will not explain how this can be done - there are documents out there for the $ c8 O4 X- G- O& j
- interested. The requirements include a (empty) database for TeamSpeak to use
) c' m+ D, o" `2 _$ e, L1 G - and a user account (username + password) that has the permissions to do stuff
+ I. [6 d) [/ k5 a - with the database. Additionally, you will need a vendor library installed on the$ b) s* v8 ~1 m4 O; s
- local machine, this came with my MySQL install.' q8 a! O7 O i8 G2 x; P
- These instructions will not tell you how you might transfer your data from the
% G8 T$ a" z3 e( F, D1 O - SQLite database to the MySQL database, we start with a clean and empty MySQL
9 T# f5 I1 R; m8 w1 @" A - database.4 z! O& r- b. J q! J5 M: i
- Some users have reported ways to import a SQLite database into MySQL, but at
1 n. o! O2 `5 S. z( Z' w - the time of writing, there are still too many issues - check the current status% q, B) u& X% I/ F# }; p
- in the TeamSpeak forums if you are interested.
0 ^& t1 k% U! F' K - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 m- M. T J, e0 l) _4 a. Y f) u
- Borland was used. This driver can only interface with the client library that 2 a! N+ n3 C8 I! u
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ E) r- g8 X* O/ {; a" F7 T - client library - basically all you have to do is to use a 3.x client library as
8 r& q% f7 m2 {" F8 w - "VendorLib" and a 4.x database to connect to.
$ A8 M" T9 j( U0 q - If you need more info about dbExpress, you can contact Borland.* f$ M) K) l6 Z% K- F% H
" U" E, B' r$ @# `- ### Doing the work ###
% g, J) j8 O) \% G5 l' l( n r - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
6 l1 C; @* Q1 J! W/ }6 r- k; y - the perquisites right, just open your server.ini file, and add this section at
0 ^3 @- V7 p5 ^ o9 P/ O7 K4 u - the end:2 C6 b9 T8 R. N/ I5 D7 ^# a# _
- ---cut here---
0 x H/ q/ J* r - [DBEXPRESS]" Q2 i- i& _8 S4 G S
- sqldir=mysql_sql
0 B" G* o; l$ i- T! ^ - Drivername=mysql
! c& _1 L' U" @3 C# z- ] B( X3 X - Database=Your_Database_Name_Here
: |# \* R' R8 U( v7 t7 E - Hostname=The_PC_the_MySQL-Server_is_on
7 h! m! a: P- \9 p( O - User_name=User_name_on_the_MySQL-Server
& Z" d! r9 h% ]8 }/ S7 n4 I - Password=Password_to_go_with_above_user_name8 @6 f$ c1 l) F6 G# L, W$ c5 L
- GetDriverFunc=getSQLDriverMYSQL7 k7 m4 @* O$ O5 j
- VendorLib=path_pointing_at_your_mysql_vendor_lib
0 G2 s) l0 r5 G# [4 t/ P7 c0 P - LibraryName=path_to_libsqlmy_libary8 J* c9 L) @( m/ W. E( H" i
- Active=1
8 R8 v5 V& V0 Z0 b& R/ i+ P - ---cut here---, z7 h2 G& ]% s, _8 c6 v1 G$ G% V
- In my environment (a linux box with a MySQL server running locally) I have:0 [4 P( U' K" |/ | }
- ---example---
4 C5 J/ @% D, M# _* A: Z( \ - [DBEXPRESS]& w- }* Z; v1 E9 P
- sqldir=mysql_sql% h9 b: |6 _# P, n P- z4 j
- Drivername=mysql
; {9 A i, J( m) F9 ]! ^ - Database=test3 w1 s" i! d* K! [! C2 P, o- }
- Hostname=localhost
M$ t& X( o! C/ g" g# D - User_name=testuser& a, o; z' A7 h! m* I
- Password=my_password4 W- l3 z9 s& k7 E
- GetDriverFunc=getSQLDriverMYSQL3 e" |' \! q+ K) x
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
# E e* m! M3 H, ~1 G; c) |1 g9 X/ | - LibraryName=./libsqlmy.so1 A2 I J# J7 o1 P. H4 e/ `
- Active=1; [' m9 U) S( z6 C
- ---example---
5 P+ S. i/ K/ V' H1 W( s, I$ @6 A - # q$ ?; v/ g3 l* w2 {9 [
- On a windows box, also running the MySQL server locally, it would be:1 l# \1 F/ D |/ S/ H0 v8 B6 Q
- ---example---7 p% q3 p1 K3 r
- [DBEXPRESS]7 _0 k8 p" J3 D8 @& [
- sqldir=mysql_sql
/ _! x: x, p2 F/ ^- H+ i - Drivername=mysql
' {) M7 L0 x7 u& D( B4 q3 L+ m - Database=test% x( H7 k7 ]. Q x
- Hostname=127.0.0.1
: z8 I: h' `& ?) r - User_name=testuser3 y6 o/ m. `& V, Z* [& A
- Password=my_password
2 w- K) _0 y. A4 D3 P9 ?5 E) I$ N - GetDriverFunc=getSQLDriverMYSQL# F# C" k3 M+ t/ G
- VendorLib=libmysql.dll
& o/ |+ b) I$ ]7 G - LibraryName=dbexpmysql.dll" p5 L+ N7 v) o/ U+ A5 l% q6 O) x
- Active=1
3 ~" Q% N$ ]# ~ - ---example----
8 S, K6 a Y! D+ U0 Q - - written 02.03.04 by pwk.linuxfan1 `$ L% [ C+ i3 N% \8 c
- $ B l' V& R5 l* }+ P
复制代码 |
|