|
|
麻烦翻译一下,下面这段文章:xhan
8 O8 e# u6 j+ j$ O/ d# i! Q4 R A; G }) l' x+ N5 k$ @
-
+ g2 |3 n9 S5 ~0 m; z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######% R$ C5 V' @: X( j- \8 y. p
% x( ]! v* x$ X3 t6 r- ### What we need ###- Q- ^; ?& g( R8 p6 V& |* V7 l
- Naturally, we will need a MySQL server to store the data for us, this document
, @; b0 ?9 G1 |* S - will not explain how this can be done - there are documents out there for the 6 J8 _0 q) w7 S4 {
- interested. The requirements include a (empty) database for TeamSpeak to use+ o9 N K) G$ V0 n+ @& Z! _+ c
- and a user account (username + password) that has the permissions to do stuff
9 w( v& X( p. F+ M - with the database. Additionally, you will need a vendor library installed on the5 q/ ^5 z3 x* ]
- local machine, this came with my MySQL install.
/ A8 y& t' ~2 N6 S/ e# ^4 i# W0 L- D - These instructions will not tell you how you might transfer your data from the
) R1 {( J1 y% N - SQLite database to the MySQL database, we start with a clean and empty MySQL; v/ S2 l% t8 r& `
- database.
4 O; [' U. [# R1 J$ t - Some users have reported ways to import a SQLite database into MySQL, but at
4 V0 E- t( C# v |. ~7 P - the time of writing, there are still too many issues - check the current status [1 n* b% }" \& D: o, y
- in the TeamSpeak forums if you are interested.8 p7 M2 e7 K! c( K& A9 D+ c& f
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% o- ]7 E* R Q- v( H" h2 K8 o - Borland was used. This driver can only interface with the client library that
2 I% @4 g+ S2 e0 X; G6 y4 J - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
+ e1 S/ A1 h1 ]' v7 b/ r' |( h - client library - basically all you have to do is to use a 3.x client library as , R1 U5 Q( D9 g
- "VendorLib" and a 4.x database to connect to.
) R" u. j2 C' d - If you need more info about dbExpress, you can contact Borland.
, C" r8 B: R& v6 w
+ h- j* O/ M5 |$ h$ y1 T- ### Doing the work ###
+ f) S1 A4 }* l - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( d# g" v' Q4 M3 O, P+ K' I
- the perquisites right, just open your server.ini file, and add this section at$ V7 Z, w" L' d/ `2 ~5 H6 y7 S
- the end:3 N: K' g+ X& [8 ^( n; t
- ---cut here---" I- C! q6 O2 r$ W K- k9 h% ]
- [DBEXPRESS]
; b; V, r0 A% G. x& O1 Q5 x - sqldir=mysql_sql
9 w* |) J) Z7 @# J - Drivername=mysql
9 `3 \8 D5 }6 f) I! T. t3 V - Database=Your_Database_Name_Here
8 ?& H/ e2 c3 c5 t1 g" `, n$ F2 T5 e+ u - Hostname=The_PC_the_MySQL-Server_is_on
1 B9 m0 h2 L$ y - User_name=User_name_on_the_MySQL-Server* Q5 P+ G* q% I! u
- Password=Password_to_go_with_above_user_name
0 @2 R7 l3 n' L/ ~3 ?& I6 q - GetDriverFunc=getSQLDriverMYSQL
" H: q' y# g$ b - VendorLib=path_pointing_at_your_mysql_vendor_lib3 N& j7 F/ K- V3 e
- LibraryName=path_to_libsqlmy_libary4 Y! `. r" ^) b. Q2 x! `1 f) U: B9 b" \
- Active=13 b2 r: d9 ~. ?( `+ i0 Z
- ---cut here---
* \# S1 `$ Y9 |9 _. `! q - In my environment (a linux box with a MySQL server running locally) I have:
1 |6 S) `3 i9 n3 L K4 t - ---example---! w# }6 e/ U) w8 c$ I3 \6 }1 y
- [DBEXPRESS]
+ g t1 q$ ~4 e1 _ - sqldir=mysql_sql& b7 A. a* ^- V- l" \9 p% {
- Drivername=mysql) k. {# l3 e8 Y/ g8 S! R1 @
- Database=test
/ f/ _, G/ E- F2 F$ c& `' Q - Hostname=localhost
5 Y2 y2 u1 k- h2 ^, Z, P+ q - User_name=testuser
9 i4 j6 u$ Z8 l0 q! q9 s- g - Password=my_password
0 D+ J# I5 b6 I- G, i - GetDriverFunc=getSQLDriverMYSQL, C5 c$ P1 h& G# D: [- L# i$ |
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! k) G+ Y, m A+ Y( Z - LibraryName=./libsqlmy.so
( Y( T0 r2 n/ g. Q8 o- m - Active=1
. M, o8 ]) U- w" a/ p - ---example---+ v7 z- u$ Q6 i' M2 Y5 n' J- K4 e
- + R8 Y" J. K `- Q T; H
- On a windows box, also running the MySQL server locally, it would be:
; D b; t$ n, P' k% ~# A - ---example---! m( N# p, t4 Z* C% [* @
- [DBEXPRESS]
. O5 V( n) H4 o5 j, P - sqldir=mysql_sql- Q" u& W% `! u* r, w
- Drivername=mysql& n7 j6 G8 b% p4 A
- Database=test
0 \4 F) L2 f+ j6 q \ - Hostname=127.0.0.1
7 l) j( \' S2 S: k$ ` - User_name=testuser4 r- J2 {9 F4 T: T: g1 `- p
- Password=my_password
* V% L3 N* G7 b - GetDriverFunc=getSQLDriverMYSQL
& h1 T" X1 P* g& L - VendorLib=libmysql.dll. W0 m/ I. v: k) D' _
- LibraryName=dbexpmysql.dll6 L* Y) @9 ]2 w/ y
- Active=1
" E2 b1 ]) K; P# L9 w' S) T, X - ---example----
5 H" }/ O! N* n: \ - - written 02.03.04 by pwk.linuxfan
# u( q1 K0 y% T2 \" W" h n0 u
) \) m! a$ q5 ]& Z2 J8 A! q
复制代码 |
|