|
|
麻烦翻译一下,下面这段文章:xhan % i3 T: Q3 ?, `( c3 u& q) N( i
1 n7 u0 w5 A( h7 [- q7 G
-
, N8 s+ N4 |8 t7 {3 F6 B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ P H% r, i5 p7 _1 V
- 4 m# d( e5 t4 _! t
- ### What we need ###3 ?1 A& r/ h1 a# w2 x; {
- Naturally, we will need a MySQL server to store the data for us, this document
7 d; t9 W. o( P6 \8 ` - will not explain how this can be done - there are documents out there for the
8 \; `5 i% p% c9 ~: a- W - interested. The requirements include a (empty) database for TeamSpeak to use$ @" c5 r& V) B( p! H8 i+ b$ L: P, g
- and a user account (username + password) that has the permissions to do stuff
$ b- S" n7 W6 H - with the database. Additionally, you will need a vendor library installed on the5 k; P( n- J, V2 p
- local machine, this came with my MySQL install.
$ V6 @- _2 b% Q8 X2 O% X5 o* o" X/ l* E - These instructions will not tell you how you might transfer your data from the
7 o( n3 O/ I' Q - SQLite database to the MySQL database, we start with a clean and empty MySQL
$ r6 W) @! I- J9 \) e! h - database.
C. \6 Z; e+ {4 K6 V2 x - Some users have reported ways to import a SQLite database into MySQL, but at
! @' V8 s" E2 b4 V5 j) b5 U3 d' I: Y - the time of writing, there are still too many issues - check the current status1 \$ Q# Y- p! L6 t0 e: s b T
- in the TeamSpeak forums if you are interested.
4 F9 z, Z3 f* K/ s, c5 Q4 { - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# ?1 l- @1 u0 e$ _+ W
- Borland was used. This driver can only interface with the client library that
1 k$ G. L$ ?2 K+ D3 P4 N+ F - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 L0 ] W3 t" s4 K" K
- client library - basically all you have to do is to use a 3.x client library as
2 Q+ r: p; E/ H5 k) P$ ?! k - "VendorLib" and a 4.x database to connect to.8 J4 c' v( v, x
- If you need more info about dbExpress, you can contact Borland./ [# ]( H! Q6 t* ~
- ( F+ V A$ p5 @% [+ p$ C
- ### Doing the work ###4 b- ?4 V; j D# l& C& @ T
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 n! o% U1 |) N/ `6 d( t
- the perquisites right, just open your server.ini file, and add this section at3 s" j d2 Q' j
- the end:
$ U5 [9 w6 ~: n& G- z - ---cut here---( M0 k' S9 q; a- `3 j6 o0 L
- [DBEXPRESS]0 s/ ?: Z/ a3 t
- sqldir=mysql_sql
1 T0 Y* h4 M" F) }( k" c, z( { - Drivername=mysql
3 l' h8 Q4 o M5 M. j9 i8 B - Database=Your_Database_Name_Here
5 d( P. g) U1 d( d/ x' F" B1 A - Hostname=The_PC_the_MySQL-Server_is_on4 P( A! @+ B7 O9 ]
- User_name=User_name_on_the_MySQL-Server
: R& z( r8 z6 N5 p6 t8 I - Password=Password_to_go_with_above_user_name
2 `+ H3 w$ H6 T E - GetDriverFunc=getSQLDriverMYSQL `; _7 C N6 a- p% {
- VendorLib=path_pointing_at_your_mysql_vendor_lib3 V6 q' W$ z: M7 C
- LibraryName=path_to_libsqlmy_libary
5 ^( V' F% }4 r7 k- H* j" q2 P - Active=1
, _0 |& ]# G Z. C0 Y - ---cut here---
3 @+ X) D8 Q: S$ {- \# d - In my environment (a linux box with a MySQL server running locally) I have:" m# {( v' g' p4 K
- ---example---' n! M9 X$ i8 N% O
- [DBEXPRESS]
$ w, w9 V1 ~- J4 V9 ]2 J2 ]! h - sqldir=mysql_sql4 |( \6 h* x% u1 o: m c' S n
- Drivername=mysql
9 ~7 `& l' s1 i D- c1 \ - Database=test
$ E: l! A/ t- L - Hostname=localhost
$ o+ C' |* }7 E - User_name=testuser
- r4 E: F: [7 M4 J" f" p - Password=my_password+ b* x8 X: x$ x' K
- GetDriverFunc=getSQLDriverMYSQL
: S2 {3 m7 V/ P& O8 o* R6 v& i/ ?( ` - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
4 M% n" J2 @0 O1 |& j/ V - LibraryName=./libsqlmy.so
5 X/ n% E+ w$ d1 G - Active=1* l4 J4 x. e4 A
- ---example---& t& g+ x" t3 \
$ S; V( P R& o4 p# ]0 K- On a windows box, also running the MySQL server locally, it would be:2 d/ K6 v& D& O7 `8 X1 x4 v7 d5 _
- ---example---
! d% p c/ @0 k! g, A - [DBEXPRESS]
9 s$ O( X- \3 I6 Z - sqldir=mysql_sql
& y% q9 @% [% N2 g0 k- s5 a - Drivername=mysql, K* d2 }$ F) R) K$ |* e
- Database=test
G8 f) \! j2 L( E+ k9 C% D - Hostname=127.0.0.1& R, |5 \ {3 P% U4 |0 x( d2 z+ [
- User_name=testuser
2 @% D4 O2 U9 z5 D5 c' `1 c" B - Password=my_password
3 S* b0 p, @( t. x8 q/ p - GetDriverFunc=getSQLDriverMYSQL& C+ N. |- _! f
- VendorLib=libmysql.dll
, b# x0 _( i, W7 C( S1 U+ L - LibraryName=dbexpmysql.dll3 g7 K/ b2 ?* W$ f3 |6 }
- Active=18 B, I0 o9 T: |3 r$ U' V1 @ h
- ---example----
! v7 L, x" y/ J+ j0 D; ~9 U - - written 02.03.04 by pwk.linuxfan3 B2 X% I }, x9 Z: J( c1 p+ c. O
& f" O0 ]- ^7 v! E7 \
复制代码 |
|