|
|
麻烦翻译一下,下面这段文章:xhan : U. u; c" |( x2 ?
" [7 S( p0 n+ {0 r. @- 6 E$ R5 \! r. |
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 ?4 Y/ Z; y" Q( l( b4 R; H - 4 W$ r; J* g, Q' d
- ### What we need ###
; Y8 C4 |; k( X! Z0 i- n1 C - Naturally, we will need a MySQL server to store the data for us, this document % d4 j6 A. c' C8 j
- will not explain how this can be done - there are documents out there for the
+ d( j5 j% O$ f0 p( k& e* q: x! x) k - interested. The requirements include a (empty) database for TeamSpeak to use: f3 o, j! R+ j! `7 c
- and a user account (username + password) that has the permissions to do stuff
+ U$ j. U2 u8 Q& R' ~% N' {8 J0 h - with the database. Additionally, you will need a vendor library installed on the G7 r5 T% n' X- j" o0 j
- local machine, this came with my MySQL install.- N+ A: K" N- h) \% t, p, R, @
- These instructions will not tell you how you might transfer your data from the
0 G1 R j/ k, l' N/ L7 { - SQLite database to the MySQL database, we start with a clean and empty MySQL3 ]* N+ X5 n I1 H
- database.% q& Q) R& Z% V+ y5 s
- Some users have reported ways to import a SQLite database into MySQL, but at
" a1 ~5 Q# l( Q# m" Q# _+ b+ q& H1 g. c - the time of writing, there are still too many issues - check the current status
! ^- ]2 w) |0 y# _) w2 A5 |( G - in the TeamSpeak forums if you are interested.
: Z& t& E) m; f* d9 d! N9 @ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) Z0 a) P4 A; V0 v+ |1 }
- Borland was used. This driver can only interface with the client library that
$ H: x! m! q9 p- e7 V# k# U7 T - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this D5 R! z2 C$ w( b" c: F
- client library - basically all you have to do is to use a 3.x client library as 0 D7 I' P/ J& R
- "VendorLib" and a 4.x database to connect to.* H/ M* E( I% \6 E6 h5 C
- If you need more info about dbExpress, you can contact Borland.
6 [8 h* g4 l2 r, I& O/ V9 Q
% s0 o- K7 [- N: e5 |2 [- ### Doing the work ###
+ @9 l# W" |# U - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
0 M8 o4 y5 n `; C2 ]% P - the perquisites right, just open your server.ini file, and add this section at
0 L4 l$ U/ I1 e1 V5 g B( R - the end:
7 T# p, ^7 r/ J - ---cut here---. Y' d" S& ]- b1 _
- [DBEXPRESS]4 \" a' E0 Z1 Z' P4 o3 P
- sqldir=mysql_sql
+ _ M7 D0 T) z2 v) U/ D* D5 d/ D - Drivername=mysql# [. {; W! n: O
- Database=Your_Database_Name_Here# g6 q( ?" S) U
- Hostname=The_PC_the_MySQL-Server_is_on$ L6 n' y( v& \
- User_name=User_name_on_the_MySQL-Server% ~8 [5 d* y& F& C9 o: j% Y& S
- Password=Password_to_go_with_above_user_name
7 M+ E0 ~/ n3 Y5 i" u ] - GetDriverFunc=getSQLDriverMYSQL
% E1 A6 ^; _6 h* T - VendorLib=path_pointing_at_your_mysql_vendor_lib: T# B1 {" o2 V( }) ]3 A
- LibraryName=path_to_libsqlmy_libary4 a$ |3 T+ f. f9 h2 j3 K- P
- Active=15 q7 N7 t8 S9 ~/ ?9 V+ A/ E5 E, F
- ---cut here---$ f$ h' ~" s; }$ X
- In my environment (a linux box with a MySQL server running locally) I have:
$ q1 ^7 g- g4 G% } - ---example---
8 a9 D: W2 V5 [/ f( L1 | - [DBEXPRESS]
! p/ I, l& `% Y1 ^/ D" @ - sqldir=mysql_sql/ u: F, ]& Y) l9 ~
- Drivername=mysql
* z* v; w, V, M$ E5 d - Database=test m$ @7 [9 J& I; I
- Hostname=localhost
4 u& R9 a( L! ?6 G9 X2 B$ U& @ - User_name=testuser
% i! A, V/ b/ a% ]1 ? - Password=my_password
9 i( Q% J) l) `, X. ]" Z - GetDriverFunc=getSQLDriverMYSQL) f( Z7 X- K7 J$ V4 y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" ^+ r9 h, C1 b5 a4 v - LibraryName=./libsqlmy.so
. k! A9 b! R3 e9 N - Active=1+ q9 k% r9 \* p( v; r4 y( ^
- ---example---5 Y1 N! H( `' M. b3 o5 C2 V, |; j. q
# `2 z$ j) X; j7 o4 Z$ b- On a windows box, also running the MySQL server locally, it would be:
Q! h$ z d3 l/ B - ---example---' m( k4 {6 I% l8 C' V' K% c9 S# T! b6 |
- [DBEXPRESS]" Y- D) r2 L5 v& v+ L9 ^4 x6 r
- sqldir=mysql_sql: v2 l8 E, @# r4 b; \( q
- Drivername=mysql
1 V. b% z3 Y! y, f7 Y5 m - Database=test
6 C5 r+ ^6 Y/ Q8 M - Hostname=127.0.0.1
; J, T5 x9 _' u8 D+ h' \ - User_name=testuser- M v5 D v+ R4 j4 c0 f
- Password=my_password0 N) _& H; ], `5 R y# E* s/ v! I" G
- GetDriverFunc=getSQLDriverMYSQL6 j8 G8 o8 m" U, k0 a" q3 j
- VendorLib=libmysql.dll; W+ h7 P1 a+ F3 l( v
- LibraryName=dbexpmysql.dll& V( q+ d- \- g# D0 ?" ~6 i" D2 k
- Active=1
8 \7 h$ l1 b% Y) b& C0 H1 i - ---example----
9 e# }- D9 Z& D5 k - - written 02.03.04 by pwk.linuxfan
: ^; ^5 D( ?' {
) H) d6 V* d5 o. ~# c
复制代码 |
|