|
|
麻烦翻译一下,下面这段文章:xhan
5 ?, @! h. Q" t! V' h# z+ h8 A" [8 n8 e* O) G, u0 ]
-
% P A- r0 z% S+ a# H - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ d x% g/ w# D+ v1 a2 g- W( }
- * P" \9 ]& s+ I& x0 ?5 ~. n& \
- ### What we need ###
0 j0 }$ _; l1 C+ F - Naturally, we will need a MySQL server to store the data for us, this document
k2 {- k2 | t% t- a - will not explain how this can be done - there are documents out there for the 1 ^2 @& i: g& c5 v' g' h- y' k( G) r
- interested. The requirements include a (empty) database for TeamSpeak to use* ?% x7 p; W) x+ Q# ]! m
- and a user account (username + password) that has the permissions to do stuff
, E9 M [4 e( S" I; t; m - with the database. Additionally, you will need a vendor library installed on the5 D% V a+ u2 c0 H# J. |0 V1 ]+ \( k
- local machine, this came with my MySQL install.' c4 N( w: v3 I3 S4 T# T
- These instructions will not tell you how you might transfer your data from the
; k" m) @0 \. E: w7 R8 F: K% h - SQLite database to the MySQL database, we start with a clean and empty MySQL
1 S, A/ R6 H3 v& K8 Q& @* m# K; x - database.' I6 s2 q7 D, c$ @3 X' w& c# d9 x
- Some users have reported ways to import a SQLite database into MySQL, but at
2 O3 B" {! l! b f B3 M' Y - the time of writing, there are still too many issues - check the current status) ^4 N# l8 r' W5 t% f
- in the TeamSpeak forums if you are interested.
) ^' y) u' p0 L5 R9 E5 b& G x - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 u$ p: E; O# e7 g- ~! i* z! j
- Borland was used. This driver can only interface with the client library that f0 s9 i& n* Q/ O, L% n# |& R' a! t
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# [) n1 |# b( w* T. Z% O& s9 `1 ` - client library - basically all you have to do is to use a 3.x client library as
( m$ m( j5 y& J% u7 F4 ?0 B) Q - "VendorLib" and a 4.x database to connect to.+ T8 R+ G; L& V" \# [) V. v4 P
- If you need more info about dbExpress, you can contact Borland.
5 k% ^' N) z5 b, ^
{+ q, u$ n, t- ### Doing the work ###
2 O# g) I1 Q. Y. C4 n: M - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 i8 I9 M/ e) N0 Q! I I
- the perquisites right, just open your server.ini file, and add this section at
% x5 p9 o+ O3 L& s! I u* V - the end:
7 K2 k) G& \& G - ---cut here---
, ^* m; S3 Y. m, ] - [DBEXPRESS]
8 e- L8 v/ j! T) i) m1 H H6 h1 H# q - sqldir=mysql_sql9 a; H w: C5 w$ T
- Drivername=mysql
. h* L/ {1 n/ H# g2 j - Database=Your_Database_Name_Here
( ~1 K' C' M) E4 h+ S- f - Hostname=The_PC_the_MySQL-Server_is_on: j' ?- i. |. m; {) C7 n" L, n
- User_name=User_name_on_the_MySQL-Server7 Y4 q# h2 O$ J6 l
- Password=Password_to_go_with_above_user_name
/ H$ R3 E: z; v# M6 e - GetDriverFunc=getSQLDriverMYSQL
* v; d2 t$ w4 W j# z: c A" e - VendorLib=path_pointing_at_your_mysql_vendor_lib' P" F) M! _ ]" X+ w
- LibraryName=path_to_libsqlmy_libary, i( }# w* i+ |1 c" |; V9 j
- Active=1: d1 D8 B9 S) f w8 R7 y3 M
- ---cut here---5 I" m c- R% ?4 t( i
- In my environment (a linux box with a MySQL server running locally) I have:
4 M# R& H" \/ @0 F+ `$ D - ---example---
3 U9 G( E8 b' a - [DBEXPRESS]1 v! z! s8 R. B* Z {2 B h1 I
- sqldir=mysql_sql+ U! V7 C' }8 m" m7 j
- Drivername=mysql2 n3 g u0 |: S3 l* C* r
- Database=test1 t' F! j- S; [: W. r7 s; w
- Hostname=localhost, O$ p% b. r/ @9 ~5 J8 `. q$ I6 l
- User_name=testuser1 j$ R4 E/ O0 u5 d6 a& s
- Password=my_password
% C' w" |) x) U/ N3 G; X' V - GetDriverFunc=getSQLDriverMYSQL
/ f: L* s# ^$ s7 G; V6 o- y' d+ v8 S - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" b+ q' V2 Q: }8 M" [' | - LibraryName=./libsqlmy.so7 O. f6 e( I p }! G$ s g
- Active=1
: |% Y3 v$ Z8 [5 P' v/ } - ---example---
# `% L7 W4 O" O; U - 7 F1 j) T! Z. m. [) u7 K* x. a
- On a windows box, also running the MySQL server locally, it would be:
& _, ?. p6 n0 {1 @ - ---example---, t& S; \/ B3 D1 D; F3 t
- [DBEXPRESS]( I! t+ [- ]8 D" y! g1 ]4 P2 t& _
- sqldir=mysql_sql; W) l% J- M! C! D
- Drivername=mysql* p z- v8 K$ M7 Z
- Database=test! u6 E [# M" e* ~# D' \' @
- Hostname=127.0.0.1# N$ T1 v* A& J$ S( A0 F# a
- User_name=testuser- w4 h7 s- g' y' o E9 f
- Password=my_password3 r V+ Y+ B5 `' Y
- GetDriverFunc=getSQLDriverMYSQL
: L/ P" z, d5 L' ~9 }* s - VendorLib=libmysql.dll
- O/ ^2 m0 T3 O& i# P - LibraryName=dbexpmysql.dll
9 X0 O! V" c3 s: E2 S- W - Active=1
! w" y% {5 H5 `) ]+ h$ m, y - ---example----5 G" T; b' J; n1 L3 t8 z5 r4 R
- - written 02.03.04 by pwk.linuxfan
; R5 g. y9 [: ~. ~1 U/ G3 Y* N
5 A# `$ F7 c1 e4 ~' G
复制代码 |
|