|
|
麻烦翻译一下,下面这段文章:xhan
6 ~& `& X# B' m& p! A
+ b( o$ T5 ?& s1 x; U' _-
2 m* X$ [) m6 J: T! w& \ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######% [. P! u& k! }/ R: [( [3 y% t& c
- $ r8 N& _; F5 E, z. q) g) ^
- ### What we need ###5 w! D) a3 r2 ]" B4 H) A/ Z" D
- Naturally, we will need a MySQL server to store the data for us, this document
$ Q/ |! k; c1 Y - will not explain how this can be done - there are documents out there for the + @; u! f4 z7 f8 i" e9 V& D
- interested. The requirements include a (empty) database for TeamSpeak to use
( f; [, i$ v# e- a+ ` - and a user account (username + password) that has the permissions to do stuff
2 _- X2 F/ o+ e( m9 p' c7 i6 x - with the database. Additionally, you will need a vendor library installed on the; a& @4 g+ l8 u- l: G
- local machine, this came with my MySQL install.$ ~' T/ `1 Y' b8 |1 Y' p
- These instructions will not tell you how you might transfer your data from the; h/ j: N* R* \% ]: K* U5 _7 g
- SQLite database to the MySQL database, we start with a clean and empty MySQL
1 z' H8 p6 y' f! Y \" V" u8 r - database.
3 Z1 m) a) w5 k9 n4 \& p - Some users have reported ways to import a SQLite database into MySQL, but at! v. D- g6 ]) m
- the time of writing, there are still too many issues - check the current status
0 s5 e4 F& [; Z - in the TeamSpeak forums if you are interested.
: {! l+ e/ H1 J K. Y - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, R2 z0 G2 t! \1 X; z9 O - Borland was used. This driver can only interface with the client library that
, ^# W" t; c0 S1 F) _ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
7 ]' l# p: H: T/ x- _. c - client library - basically all you have to do is to use a 3.x client library as : h {' M S( i7 p X8 V
- "VendorLib" and a 4.x database to connect to.8 z) ~/ L/ k2 [+ w4 k5 r4 m
- If you need more info about dbExpress, you can contact Borland.1 C. f: W& S" L7 c5 j X
4 b3 C4 S" L r0 h, J4 z- ### Doing the work ###" V5 Z: I0 t8 B# F7 Q
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
1 A' L: r% E. e+ _3 a - the perquisites right, just open your server.ini file, and add this section at! N& m, ?; h9 H0 G& G$ ]) ^" ~! u
- the end:' S! [6 P4 K3 ?$ U" |. G
- ---cut here---* c' M% B D. o& O8 x5 c8 W
- [DBEXPRESS]
/ S! V1 S1 s; |/ C- A4 P& ? {: o: { - sqldir=mysql_sql% p1 |& Q- m! T
- Drivername=mysql
. J8 [- Z7 j! O, m5 B+ G - Database=Your_Database_Name_Here
. Y$ `# [8 q! s! \' j5 U - Hostname=The_PC_the_MySQL-Server_is_on
. Z- b% I4 D- I. `. M% f3 x/ a0 T7 ` - User_name=User_name_on_the_MySQL-Server
: a, L. Y6 i6 U) u w - Password=Password_to_go_with_above_user_name
8 d y% u; w1 }/ F' d) o - GetDriverFunc=getSQLDriverMYSQL9 k% k: O, J2 R* Y ]$ B! L* {2 H
- VendorLib=path_pointing_at_your_mysql_vendor_lib
! q6 U& Q( K8 \. k) x. ~ - LibraryName=path_to_libsqlmy_libary
8 W3 d& z( x* H2 W' w- D - Active=1+ \0 X! y6 J( y# t/ a1 b N5 n
- ---cut here---
7 x6 \+ b$ x& B$ H1 H: \& I$ T - In my environment (a linux box with a MySQL server running locally) I have:
$ U! |& ?. w* S! K6 Q4 d - ---example---
$ Q3 T, Q1 W2 R( j+ a1 w* _ - [DBEXPRESS]/ ]6 z( V3 G0 C" ^2 n+ [
- sqldir=mysql_sql; I7 d3 X J: d$ O+ U
- Drivername=mysql2 O) C: e, Y- B4 c" u: E# X) y0 m
- Database=test, {* C, z0 e: z
- Hostname=localhost
/ a/ C$ I# H$ ]1 x& H/ Y& @; ~ - User_name=testuser! t% e( y4 }5 ^+ I3 g2 \
- Password=my_password
, p- ?& ?, p0 b' v; r y; i - GetDriverFunc=getSQLDriverMYSQL! r* b( _# W3 r+ c }
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0# M+ X" s+ T# @3 y
- LibraryName=./libsqlmy.so
4 A' _6 p7 W( P - Active=1
! R' l2 |& N; \4 [' N t - ---example---
6 p1 c9 e- _3 ~
0 A% B \+ ^9 B! y5 E- On a windows box, also running the MySQL server locally, it would be:
: { t. P' L4 y5 V( c$ e7 { - ---example---/ Q# E! i2 r3 R6 |) s
- [DBEXPRESS]8 @! ^( r0 @# }7 I; G# T
- sqldir=mysql_sql5 R& j% M4 Y9 q; R8 `# T" P
- Drivername=mysql
0 d8 F4 N) G+ y9 ?. n - Database=test
% t* {7 D. H6 R7 j! J- Z - Hostname=127.0.0.1
! ^" I5 {4 b; i& O/ l$ N - User_name=testuser! l r! V3 [- D& g6 u+ F
- Password=my_password
$ x9 F2 l; M7 N$ u* F: J/ d& ^ - GetDriverFunc=getSQLDriverMYSQL* I# ]2 W* ~2 O( n( T
- VendorLib=libmysql.dll
+ G; \# C5 f I7 d1 x - LibraryName=dbexpmysql.dll8 E. y$ ^3 m; g- D; n4 V
- Active=1
4 O5 H I0 W/ ?) J, l) @ - ---example----0 p- |% ]+ j4 G/ y& P+ F
- - written 02.03.04 by pwk.linuxfan& x2 H6 @+ o6 ~
- 4 i' O" D4 W: |+ O( s
复制代码 |
|