|
|
麻烦翻译一下,下面这段文章:xhan e. V. G5 T8 E0 ?$ P" f
1 W- T: D7 z/ Z# [( X3 s
-
' [8 A, P \7 e: T6 X9 e - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######& G1 Z' Q& g+ p7 N7 D9 c: S: q
0 p7 x, L: `& \0 c! I3 {* `- ### What we need ###
! a% c) j, @& D0 `$ w- G" A3 } - Naturally, we will need a MySQL server to store the data for us, this document 0 E# F% y+ ?6 z$ P2 G3 U* u1 V
- will not explain how this can be done - there are documents out there for the 3 x9 i! h6 h6 [! m
- interested. The requirements include a (empty) database for TeamSpeak to use
% F; b, ~" ^ j) r! W0 O - and a user account (username + password) that has the permissions to do stuff" N7 X3 C% Y7 f' W. q
- with the database. Additionally, you will need a vendor library installed on the
* T; R! n. o9 A! { - local machine, this came with my MySQL install.9 q! L8 }. _& O( C
- These instructions will not tell you how you might transfer your data from the# a- C, p7 Z. q' M$ O
- SQLite database to the MySQL database, we start with a clean and empty MySQL+ o" A0 f5 m; v% W: h) `
- database.' z9 e7 v' ~% P. i U
- Some users have reported ways to import a SQLite database into MySQL, but at$ {4 }" n) h* r4 x
- the time of writing, there are still too many issues - check the current status
Y; r- C7 f% R, `% h5 H! O - in the TeamSpeak forums if you are interested.
3 l, {7 }. r* w+ c) n8 B1 s - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ T0 \# i/ ?1 [( x8 R! x1 I* X
- Borland was used. This driver can only interface with the client library that 3 [: A# A3 {5 V) _$ C$ U
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this7 b1 o4 a' F# v# w( d& O0 i
- client library - basically all you have to do is to use a 3.x client library as
# J0 d; `5 l, ?. J+ I - "VendorLib" and a 4.x database to connect to.7 H% E1 H# O0 z2 o2 m, u! D# n9 F
- If you need more info about dbExpress, you can contact Borland.
& F- {# Z8 I5 o% d - " u$ H/ T. K- U o' N
- ### Doing the work ###1 w- A( Q3 |) l ?
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ \0 U5 q; T1 u, z$ X2 E1 ~
- the perquisites right, just open your server.ini file, and add this section at# Q/ w0 y1 H% S( N7 O- x8 y
- the end:; T% w& p7 N0 U2 G3 [ S! I
- ---cut here--- Y6 b$ v% g; s! s, X. F [/ B
- [DBEXPRESS], R$ c) |! K/ `% A/ D% \/ H
- sqldir=mysql_sql! u& s$ B# K+ k; Q6 H! O: \* r( G
- Drivername=mysql: F3 N. |7 f1 D' L
- Database=Your_Database_Name_Here" F3 \. q E! [8 r
- Hostname=The_PC_the_MySQL-Server_is_on- {9 C, `. n9 V/ _( z
- User_name=User_name_on_the_MySQL-Server
7 T; K3 M v" ]- C - Password=Password_to_go_with_above_user_name
/ M# B# H) [* Y7 v& G - GetDriverFunc=getSQLDriverMYSQL0 f7 ?4 ~% g0 O: y4 c( p: ` E
- VendorLib=path_pointing_at_your_mysql_vendor_lib, O4 T7 ]& @$ ~* z+ |
- LibraryName=path_to_libsqlmy_libary
$ s9 q H* T( X- P0 Z- E$ z' x - Active=1
8 I- V9 z4 r6 a( \ - ---cut here---
* J: e. u4 v; [$ P. [+ { - In my environment (a linux box with a MySQL server running locally) I have:
! g1 v) f% \- B5 T0 z. ? - ---example---
+ y& C% }; {) f4 g - [DBEXPRESS]
# q' j6 \' @+ Y - sqldir=mysql_sql' k2 O* w U* A W
- Drivername=mysql+ W( C+ ^2 R, ~' q3 i1 _
- Database=test
9 C2 Y! _. S+ c. k - Hostname=localhost
2 T! n2 q) s6 I# N* H - User_name=testuser
% c1 B! S" u" p9 `8 \* }) | - Password=my_password
x8 p* g! N4 R- V5 D- k3 r - GetDriverFunc=getSQLDriverMYSQL) J- ~7 L2 j, o' X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0! @- j$ P% c ^$ l3 O1 F+ G. F
- LibraryName=./libsqlmy.so( B) ]9 y( h+ N" x. d1 M# a# J
- Active=12 ^: j& A# g9 H0 O# J! Z( I
- ---example---# ~5 f# m+ Z1 a p. |4 j
- 1 h P# z \$ ^( X0 Y
- On a windows box, also running the MySQL server locally, it would be:3 y+ E% d" o+ ]3 H* [& V
- ---example---: i. u7 K( T% |& C& A% Q
- [DBEXPRESS]) S0 A# j! d1 l) t( H6 V- n# M
- sqldir=mysql_sql
4 A8 \; n* c, w G; m - Drivername=mysql4 O, i: F5 x) T- P
- Database=test
3 D. v5 Q: e" O5 G - Hostname=127.0.0.1
: g. ~, \# m* a, S; _ - User_name=testuser0 q8 C) [0 B n& f% g+ s" E
- Password=my_password) h" r {1 ^: B, ~( D, E7 J/ }: g2 f6 C" ~; B
- GetDriverFunc=getSQLDriverMYSQL
3 }4 S- y: V% J9 y" s. M( O! | - VendorLib=libmysql.dll
9 Y4 Z2 @! u# I# p6 s7 o! w( X - LibraryName=dbexpmysql.dll
5 e8 ]0 C* S# S, D. k$ v - Active=1% i% {+ s1 Y1 ?4 R6 r
- ---example----- ^" y% }' n2 ]
- - written 02.03.04 by pwk.linuxfan( r5 }. g6 N* a# z
" ^* P' n- N! Y
复制代码 |
|