|
|
麻烦翻译一下,下面这段文章:xhan / f$ u |' q" N
# m4 P( \, @+ L4 P
- . G" ?: O3 V" G3 {
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
/ h Q, F: X! A: b* |8 r
& h1 X1 u3 t* K5 P: G$ j- ### What we need ###5 E" L/ ], i8 n+ y$ x
- Naturally, we will need a MySQL server to store the data for us, this document & b! k& |% J/ g7 O% L" I: s
- will not explain how this can be done - there are documents out there for the . d6 l* \8 T' o* e8 ^
- interested. The requirements include a (empty) database for TeamSpeak to use
7 r+ z. z7 b* Z2 J( P+ H - and a user account (username + password) that has the permissions to do stuff
6 S% Z+ l8 w: S6 _% J9 b* x - with the database. Additionally, you will need a vendor library installed on the
* ]& {4 E) v- j' ~ - local machine, this came with my MySQL install.
5 k7 R8 H, ^1 K$ X$ _3 \8 g" t - These instructions will not tell you how you might transfer your data from the
. H3 B" \! W) ]. C. ^ X - SQLite database to the MySQL database, we start with a clean and empty MySQL; ]! L, [& s; Y! f9 S% \
- database.
' W; j' N1 `3 J5 Y - Some users have reported ways to import a SQLite database into MySQL, but at6 E* m3 q) L' h ~
- the time of writing, there are still too many issues - check the current status0 a; h( M6 ?( G L$ u
- in the TeamSpeak forums if you are interested.
; D) B! ]3 H. B1 n r" c - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from: G W( ?1 w) B
- Borland was used. This driver can only interface with the client library that
5 x' C# W& W" b# a, ~& X - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 w3 g1 |5 I: j6 e
- client library - basically all you have to do is to use a 3.x client library as
% R, L9 N" J8 Y - "VendorLib" and a 4.x database to connect to.
6 x" d: x3 I9 Y2 f+ W - If you need more info about dbExpress, you can contact Borland.) J# i* J! J6 k* G! H8 q
8 K G/ w4 l" G" C/ B3 d% ?' L( r0 Y- ### Doing the work ### F% _0 y+ e4 M- M0 w* |
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
2 v% g( x/ P) @/ ?; m: F - the perquisites right, just open your server.ini file, and add this section at
6 ]! Y0 t. T- P+ G+ ?& T - the end:
7 a/ G9 t1 k3 G4 z9 U$ A - ---cut here---' d- }, a; w6 u; z* `) ~) ~
- [DBEXPRESS]. z# W/ T3 I7 u! Q( `4 c7 h
- sqldir=mysql_sql |( g( ^) S# f0 p' l) F
- Drivername=mysql4 C3 |7 Q4 ^1 S6 o/ f
- Database=Your_Database_Name_Here/ i6 f) K# E* a: l
- Hostname=The_PC_the_MySQL-Server_is_on# c; D( {, ~' L% c
- User_name=User_name_on_the_MySQL-Server
' R$ G# E7 p8 V* J - Password=Password_to_go_with_above_user_name2 B% T1 M. s/ V3 I3 \8 L. S
- GetDriverFunc=getSQLDriverMYSQL, C' p* i+ ~0 s* Z6 w
- VendorLib=path_pointing_at_your_mysql_vendor_lib
( G/ [( K8 I4 T$ E1 `# j6 ~ - LibraryName=path_to_libsqlmy_libary
# g( q' T! z) |7 ? - Active=1: _: @4 V4 M1 l P4 r0 o- x
- ---cut here---" Y( a& E' ^ O8 \ V9 M* \2 z
- In my environment (a linux box with a MySQL server running locally) I have:
; u n+ w# O8 W) E* v& T% o - ---example---4 L) ?* h4 x/ Z( m
- [DBEXPRESS]8 i$ [9 ^" U' V! U$ K
- sqldir=mysql_sql
: e. m! I2 O/ A& g* D# S - Drivername=mysql0 d6 | }4 G r/ m$ s9 t& ^4 h
- Database=test4 v4 S! A. c, Q
- Hostname=localhost
1 Y; d) m0 O8 C* e* k7 F/ ] - User_name=testuser
+ o9 s, U; X a( s' R& v) Y( ~ - Password=my_password
# {5 R5 ~0 K2 C4 K7 }* T- E+ c - GetDriverFunc=getSQLDriverMYSQL: V6 @+ k4 x) I \- \
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; s% C3 f# d7 @% {* t6 U6 K/ q - LibraryName=./libsqlmy.so
4 d$ \* I! ` N$ s1 n - Active=1
5 f( E% l/ u* Z4 a8 I( j) |0 p - ---example---
4 [) K, ~3 Q% |- [2 B- Z
; [9 o! f4 a+ P. U6 A- On a windows box, also running the MySQL server locally, it would be:
5 D; ~: ?% N+ N7 b6 A" m9 f - ---example---' Q2 W! ?" H8 c4 v+ ~
- [DBEXPRESS]
' S8 A r% ?: A+ J& h" E- p - sqldir=mysql_sql9 w6 W% c2 \; L7 f1 |* x
- Drivername=mysql5 ~% r8 W9 o: W/ e! ?7 e
- Database=test
4 B# ~1 H( s5 Z$ a1 ] - Hostname=127.0.0.1, i% L K+ A7 O: F |9 Z) g- D
- User_name=testuser2 g/ C1 d5 F; f9 y8 c5 [) T
- Password=my_password
0 \- o$ y8 }* @( ?5 T- q - GetDriverFunc=getSQLDriverMYSQL
# Q9 I1 F, _, Q/ Y* L3 [ - VendorLib=libmysql.dll
1 w+ ~& h7 T( H0 J' U, w0 W - LibraryName=dbexpmysql.dll; ~' V: h/ y4 H9 P
- Active=1
# W- y* e+ l2 L2 {- F+ [- Y: H - ---example----; x) X3 m) Z, X1 O" W
- - written 02.03.04 by pwk.linuxfan; w( Q9 L! s. ~# G
- 0 s) I+ B D/ |3 R8 N0 h
复制代码 |
|