|
|
麻烦翻译一下,下面这段文章:xhan : b; G+ A X5 A* b e4 v
0 f4 B- T( Q) z
-
1 J# G+ k; K8 b/ d+ | - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
{# c6 Z9 ]0 `, s+ `3 F+ O( i
+ |" \4 ?. Y8 H- i- ### What we need ###
# r; e( d# V6 ~1 ~ ^# x2 m - Naturally, we will need a MySQL server to store the data for us, this document
( B# Z+ e" M4 u% u - will not explain how this can be done - there are documents out there for the
- @. ~, e& i4 ^0 H( O - interested. The requirements include a (empty) database for TeamSpeak to use
2 h6 _# h" E; @3 ]7 g5 Y7 \% T - and a user account (username + password) that has the permissions to do stuff
: {0 T/ s7 i% B- {6 K - with the database. Additionally, you will need a vendor library installed on the
, f" \( c, b( e a; f- d1 } - local machine, this came with my MySQL install.
' e, |1 T1 I5 a* g, U - These instructions will not tell you how you might transfer your data from the
! B; F0 k) \- X. |: S - SQLite database to the MySQL database, we start with a clean and empty MySQL
% }# ^. P2 |" O" r- l e8 p - database.$ M% j. f Z4 A
- Some users have reported ways to import a SQLite database into MySQL, but at# z( C. }' i- f) U' T
- the time of writing, there are still too many issues - check the current status
) o0 s3 V6 c2 T' w* W - in the TeamSpeak forums if you are interested.
4 d, r' g! m$ `8 Q6 o. i - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 c: w+ D( s1 b C4 c
- Borland was used. This driver can only interface with the client library that
& S# U5 I/ f' V5 I% z# L- _ G8 ? - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' L9 {1 i3 C2 [- r% ~ - client library - basically all you have to do is to use a 3.x client library as % [1 v$ y1 R$ ?2 C
- "VendorLib" and a 4.x database to connect to." `5 a5 h5 o& ?3 T
- If you need more info about dbExpress, you can contact Borland.
( j; k' ?7 W6 Z) P- a- @ - 8 ^9 M3 \# e2 X2 }5 j
- ### Doing the work ###
( `2 V" [6 C* z - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 `2 I) T) r' T
- the perquisites right, just open your server.ini file, and add this section at
& ^5 }) e! C0 O- }5 d - the end:7 t: P3 T) Q1 {" E+ h
- ---cut here---: n: U' w9 F1 ]4 B0 Q2 s3 E! S
- [DBEXPRESS]
- L" L8 F. `, V0 B9 ~: v1 C - sqldir=mysql_sql
6 g7 _; X2 b1 L - Drivername=mysql
7 @' [1 F0 R9 F9 D) _( R `: ~1 a1 y - Database=Your_Database_Name_Here# C; e1 W. [& }* g
- Hostname=The_PC_the_MySQL-Server_is_on
9 Q" ^) F" x; f1 h1 r - User_name=User_name_on_the_MySQL-Server( Z" W* T% n, [9 {: E
- Password=Password_to_go_with_above_user_name
* \5 `. ^ I/ U3 s/ } - GetDriverFunc=getSQLDriverMYSQL
# |5 d' R4 e& e - VendorLib=path_pointing_at_your_mysql_vendor_lib2 [7 y4 |, A( V) j4 [
- LibraryName=path_to_libsqlmy_libary+ G0 f v# w& V6 u7 S
- Active=1
1 E' S; Z A& V" x7 { - ---cut here---
* |; C. M7 h+ r2 r5 q1 l - In my environment (a linux box with a MySQL server running locally) I have:0 e9 X! C; c: _9 E. n L# r; K
- ---example---/ k. a1 }% d! p) s G' j
- [DBEXPRESS]2 K) Q. Z0 |5 N0 s+ x8 ?' `7 ?
- sqldir=mysql_sql3 {1 m' g5 L- z
- Drivername=mysql5 E( B# P. I) }) Y7 |& T
- Database=test: y |+ s2 y. U6 a% j
- Hostname=localhost4 q, o7 Y% t' Q% u1 U
- User_name=testuser7 v9 @* q! n: ^1 L! q
- Password=my_password- E/ Q! f/ ?9 B* H' o
- GetDriverFunc=getSQLDriverMYSQL2 t2 Y# j, f. q6 H" a5 P5 B! j
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 e8 Y) @$ ]- N8 r - LibraryName=./libsqlmy.so
: }. T. u) Y+ R ? - Active=1( G) b2 b- h; g$ t
- ---example---
& M" @1 e1 U: M/ b! H7 z2 m0 m1 C - 4 a4 x1 t+ X! p1 b7 G4 m
- On a windows box, also running the MySQL server locally, it would be:
9 h1 Q7 P; T, H) ~9 Q" l - ---example---
3 a+ z- X7 b! M. w - [DBEXPRESS]! Q+ Q) C* }$ E$ V# H6 [. E
- sqldir=mysql_sql1 E6 n+ J1 u% K: G* D* Y$ A
- Drivername=mysql
7 r6 C6 W! H$ N7 q% N, |3 A E - Database=test
8 L: U a+ I# w& r2 E% i6 g& a - Hostname=127.0.0.1) c9 L1 w" v- F4 E O
- User_name=testuser
+ c3 D2 i' u% K h, R, W8 ^ - Password=my_password
: T2 K% J* ]4 n- v% Y+ u0 _ - GetDriverFunc=getSQLDriverMYSQL/ d) }- e& _; h- S8 `1 O
- VendorLib=libmysql.dll$ D& f) k, u, C+ t3 q1 Q1 ^5 X
- LibraryName=dbexpmysql.dll
! u. @# G( d. n9 M9 p8 C+ Q( l' x - Active=1
) k! l4 p1 R9 G3 |( I - ---example----
( G" ` k! P; {% h3 B3 k5 f - - written 02.03.04 by pwk.linuxfan( w; @. r& e p
! z/ U/ L; }( A0 H$ b
复制代码 |
|