|
|
麻烦翻译一下,下面这段文章:xhan
& T: A) P) l N$ W U
# N6 Q# M. ]: J7 {* Z8 t! X2 C# X5 q+ d-
: m1 R3 ]8 y+ E, i3 o3 W: b - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 U: v/ S, G& Z8 v2 @) ^2 n
- 0 l- p( m" k% s$ K+ A, P
- ### What we need ###9 Z9 }# [" {8 j1 }( L
- Naturally, we will need a MySQL server to store the data for us, this document $ Z; X; i! D0 g9 s. Q
- will not explain how this can be done - there are documents out there for the
2 H' f. s# o9 G& r( P - interested. The requirements include a (empty) database for TeamSpeak to use4 R3 m9 N, {9 c+ t; U8 w3 V
- and a user account (username + password) that has the permissions to do stuff
8 s& `) C: Y0 h' F- [3 I# j- Y! ]9 _# w - with the database. Additionally, you will need a vendor library installed on the# y5 m# {& h" H7 F4 M6 v2 i6 a
- local machine, this came with my MySQL install.: A9 f' J' a% |
- These instructions will not tell you how you might transfer your data from the
- X3 @: D# d$ t9 H% I! P% C9 i7 s" o - SQLite database to the MySQL database, we start with a clean and empty MySQL
% Z5 \4 i0 i9 b6 `/ T - database.' Y* f4 K, V- W5 }+ Z
- Some users have reported ways to import a SQLite database into MySQL, but at
- M; Z. J @3 G$ y- l - the time of writing, there are still too many issues - check the current status% V, x3 J. d3 b) f" p7 {: K
- in the TeamSpeak forums if you are interested.4 e2 d* {: R( o+ U1 d" y
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* _; {( c! @( z; c - Borland was used. This driver can only interface with the client library that 9 k- {; ~2 }1 t) D
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 X @ t$ Z1 Q3 |1 W
- client library - basically all you have to do is to use a 3.x client library as ' Y6 u' B" j; ~1 I
- "VendorLib" and a 4.x database to connect to.
* |7 m( J6 T8 J2 i/ V' S4 f$ f - If you need more info about dbExpress, you can contact Borland.
1 g* ~* x4 K- X
# V4 B# e1 a' D) t6 V" Y- ### Doing the work ###( _' I6 _" A! R. a) L
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 `: Z1 Z% @& k4 ~) Z" ^; J
- the perquisites right, just open your server.ini file, and add this section at5 n4 V1 K) `9 ~4 {
- the end:
7 l& {6 a9 G" K" [- J - ---cut here---/ U, O' ]. ?0 O& F$ U/ U+ D! |
- [DBEXPRESS]: ?* D# j" Q; y- e; c. G
- sqldir=mysql_sql
# @5 z+ g* z, y - Drivername=mysql
7 Q* L$ Z- R% |5 @* V - Database=Your_Database_Name_Here
. X) ?% W; u, L% Z8 g8 A: n$ L6 { - Hostname=The_PC_the_MySQL-Server_is_on& N7 e( g3 N' G; y
- User_name=User_name_on_the_MySQL-Server4 G* y! h5 k; X, D9 z
- Password=Password_to_go_with_above_user_name4 ^5 I! A5 Z, K& M
- GetDriverFunc=getSQLDriverMYSQL
+ i" ]5 G) Y+ ^ - VendorLib=path_pointing_at_your_mysql_vendor_lib
0 `0 z. h0 |8 N2 V' j# |$ a+ H: |7 v - LibraryName=path_to_libsqlmy_libary
% X' S3 G* a4 D" o/ ? - Active=1
$ |- H L" Z. q3 o - ---cut here---
9 D1 y1 W9 R# C# d$ c! u0 p @ - In my environment (a linux box with a MySQL server running locally) I have:
4 H1 p- [% |1 X4 n1 x; D - ---example---! V1 r& B9 `- f2 c% K- U
- [DBEXPRESS]! g7 {7 m/ _( h! f7 V4 D! i6 \- @
- sqldir=mysql_sql9 T# U/ z0 Y( p$ F
- Drivername=mysql
$ A* N' X S5 D l - Database=test/ m* N, q1 J- P$ X3 G+ ~* O
- Hostname=localhost
1 Z9 i4 ^: W: K; c& f - User_name=testuser
, e% n5 g: E P3 D# y - Password=my_password
! F; p5 V$ m3 n" R8 r, b5 o - GetDriverFunc=getSQLDriverMYSQL
) X+ I9 g! M! k2 c& x: `$ m, g: d - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
?" f5 w8 S# h6 v1 y$ j' ^ - LibraryName=./libsqlmy.so
) _( ^* }( X1 j4 x - Active=1
; c" n3 s! w% K" q( o& z. e - ---example---8 X, [* k7 H6 d5 ?( B2 d
$ _7 a. p; ~% a- On a windows box, also running the MySQL server locally, it would be:2 R3 |0 s/ B( @* M$ c% y2 E+ Y
- ---example---4 \* \1 G& O9 _+ J. _# {
- [DBEXPRESS]
, N- Q! [5 t5 m. w - sqldir=mysql_sql) w- n, r1 I7 k$ _
- Drivername=mysql
2 ^1 N3 n# h+ s2 @: K% ] - Database=test
" G! ~6 j W! u0 s. y% q - Hostname=127.0.0.1
. u' s' d% K; L# M! t% Y - User_name=testuser* i3 F B& L0 l; _! ?) [3 I
- Password=my_password
+ p D0 `6 k9 I6 K! [ - GetDriverFunc=getSQLDriverMYSQL0 \% y1 a; {& S7 N% z( C
- VendorLib=libmysql.dll
) h* P" r0 K5 k6 h v( I; n - LibraryName=dbexpmysql.dll* H# H8 L& L8 I+ j* H' {+ G
- Active=1' W3 R6 H5 ?9 v* k+ j. i/ l
- ---example----; m u. {) O+ j6 |# _
- - written 02.03.04 by pwk.linuxfan$ R# Z: H8 o3 h
) g0 Z2 q" I% o1 h( b# \$ b) T
复制代码 |
|