|
|
麻烦翻译一下,下面这段文章:xhan 2 D$ x! [& u6 F" }* m2 x3 K& h
$ m! G, D: o: y' U) Q1 r
- & Z/ k1 j6 s4 ^. W9 _. V
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
: I- }6 P c' U, j' a - % r2 `; @* C! K* \1 d7 {1 j
- ### What we need ###
7 F- l2 u e/ \& [ - Naturally, we will need a MySQL server to store the data for us, this document 7 \0 f# o+ ~; a
- will not explain how this can be done - there are documents out there for the 7 C! y% \! D$ d. } K+ w' C
- interested. The requirements include a (empty) database for TeamSpeak to use
0 [: V! N2 F S - and a user account (username + password) that has the permissions to do stuff
) }2 t: r- B, K0 S( G9 S* j - with the database. Additionally, you will need a vendor library installed on the
: J" x" p; _) ~/ k* H" C+ y& Z- _ - local machine, this came with my MySQL install.& p5 l; ?( b! @; x+ A
- These instructions will not tell you how you might transfer your data from the3 l; b# G) ^, }3 ]& ], h5 M% R
- SQLite database to the MySQL database, we start with a clean and empty MySQL
9 ~# |" `. t4 i7 D$ _7 q/ V# D - database.9 ^: |4 {2 r0 l/ n9 A: l+ J7 b# D
- Some users have reported ways to import a SQLite database into MySQL, but at
8 g5 M/ F3 B) I - the time of writing, there are still too many issues - check the current status
2 S) U5 N: l7 n! X7 c - in the TeamSpeak forums if you are interested.
' t. W1 t6 U: s. ?* T( g( Z0 ]' [ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
; r/ [& x# v4 B3 c: L - Borland was used. This driver can only interface with the client library that
4 {9 ^2 \0 X9 ]) j: @ ` - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this' |( e& _+ q" d+ X, Q. V; V/ e! t# p8 j# ~
- client library - basically all you have to do is to use a 3.x client library as
. M* J4 R* s+ } - "VendorLib" and a 4.x database to connect to.* R) T; G/ J( {, U* _$ N6 a
- If you need more info about dbExpress, you can contact Borland.
- N, m% _; o" j( m* G6 m - 7 M/ r7 e6 G) R7 T
- ### Doing the work ###
4 V% C4 ` _9 w8 j* L- f - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
8 V1 `4 {' z2 O$ u - the perquisites right, just open your server.ini file, and add this section at5 x: ~& j, C. l8 F3 T, e
- the end:' i1 d2 N- C& z
- ---cut here---' i* ?3 l' M1 O4 J) ?
- [DBEXPRESS]9 @5 s! P0 b% K9 F$ }
- sqldir=mysql_sql
( G2 l. J8 k I5 E0 S) b o) w - Drivername=mysql
9 t2 h' F/ f3 t+ L# P; |: z& M - Database=Your_Database_Name_Here
2 _) w2 o T2 Z; R; z - Hostname=The_PC_the_MySQL-Server_is_on
; d# X0 V* t& V6 ~2 V8 T& M - User_name=User_name_on_the_MySQL-Server) S- K* Z) W! O
- Password=Password_to_go_with_above_user_name! y) T( q" P* C# ~8 T
- GetDriverFunc=getSQLDriverMYSQL
- i" X7 y3 ~2 g# R - VendorLib=path_pointing_at_your_mysql_vendor_lib: ?" M$ Z5 J/ k) Z% F4 [9 v
- LibraryName=path_to_libsqlmy_libary; j8 Z8 w" `+ T7 a. G
- Active=1( y2 b3 ^* e4 j2 ~
- ---cut here---
7 @" j+ ?" O' ` - In my environment (a linux box with a MySQL server running locally) I have:* W% Q& Y) N ~5 @' F9 M# K
- ---example---) U) R0 U7 S' M& @# d
- [DBEXPRESS]
7 e9 S# W y$ w1 P4 H - sqldir=mysql_sql6 Y% h% R D4 Q7 E* w
- Drivername=mysql
0 o" ?* `0 Q+ }! q. p - Database=test/ M3 \7 J% W% |9 h/ f
- Hostname=localhost6 l" L9 }7 r$ \! i& ]7 Z
- User_name=testuser: k' @4 J" p+ x8 b3 ` m! s
- Password=my_password
! K- q1 Q O7 {0 {7 e) G - GetDriverFunc=getSQLDriverMYSQL. L# _6 v. S' s8 W4 U
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% c! @0 w A/ J: o7 j' ^
- LibraryName=./libsqlmy.so+ b5 l0 H9 M0 Z' M4 c% W& E
- Active=1% v) i$ @3 [ m, z$ R- c
- ---example---' x; I: x$ i8 z( ^6 Y7 \0 B
- ! b: O5 O" w. D% ?
- On a windows box, also running the MySQL server locally, it would be:' O9 w5 I$ \6 q" \2 n8 x- A& `4 H
- ---example---, F" F3 h7 X9 v! O3 m
- [DBEXPRESS]$ }8 Y+ m1 v+ p" u# ~9 ]
- sqldir=mysql_sql
$ i' i7 e) }* D2 B% A& g4 ~ - Drivername=mysql
5 [9 T8 z( i8 g1 B/ _ - Database=test+ J0 U3 R3 w; Q2 b$ b' r
- Hostname=127.0.0.1/ R" b2 w0 B, Y- l5 Y8 r
- User_name=testuser. |+ e* Y' B6 o2 \* j! W7 w1 ~
- Password=my_password
% {6 z$ D' j: J- _3 L - GetDriverFunc=getSQLDriverMYSQL
2 t! M6 q, ?9 ^! g - VendorLib=libmysql.dll! R# M# w S1 p& u* s3 ^
- LibraryName=dbexpmysql.dll9 G! Y: v' Y* F' P- B& Z
- Active=1- }0 O9 c8 V: S+ _+ h
- ---example----% D) I& D! m0 ^, p
- - written 02.03.04 by pwk.linuxfan% p. U, n0 j: P7 u k
9 _0 F. H4 z" I/ `
复制代码 |
|