|
|
麻烦翻译一下,下面这段文章:xhan / A1 t% Q' d0 B( a. M+ t8 K
& ^2 A6 u7 r- L! \
- ( O- A! ?7 W4 ]1 Z6 P& [
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
, I* `; Z- |* J' M! L6 R
6 N; g& P4 g! A4 }. q8 Q- ### What we need ###
: G( {7 {$ U+ _+ z; c/ I) x - Naturally, we will need a MySQL server to store the data for us, this document % J% J0 K7 m3 {" n; z
- will not explain how this can be done - there are documents out there for the
7 R' f* Y% W, h4 n* w - interested. The requirements include a (empty) database for TeamSpeak to use. S' c$ a1 E) J) t5 f
- and a user account (username + password) that has the permissions to do stuff
% v% t3 q( h- P6 W# j - with the database. Additionally, you will need a vendor library installed on the
& v* ^2 F: ^1 F3 R0 @+ X - local machine, this came with my MySQL install.: u! p/ V$ t |3 i
- These instructions will not tell you how you might transfer your data from the# s3 f! X: a7 A. ]2 |
- SQLite database to the MySQL database, we start with a clean and empty MySQL
9 }6 t0 `6 K! Q3 L1 H8 | - database.6 K" i# C$ H, y
- Some users have reported ways to import a SQLite database into MySQL, but at
7 l7 y) E/ B7 i% S9 i - the time of writing, there are still too many issues - check the current status7 J; |2 P! o2 ]# p; ~" M7 Z+ q
- in the TeamSpeak forums if you are interested.1 Z2 q9 R! l, G9 h
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ j) V& }1 j2 n) }1 c: i2 F' q
- Borland was used. This driver can only interface with the client library that
3 z) @7 ?+ F5 P5 E; F! n - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
1 _( k7 K& ~; { j. Z( d: Z! o - client library - basically all you have to do is to use a 3.x client library as ! |" t7 L/ R& o0 ~: \7 i# J, h
- "VendorLib" and a 4.x database to connect to.
( b' W! O1 g4 s0 x1 g" R2 u; ] - If you need more info about dbExpress, you can contact Borland.5 g: t# j6 C8 F$ H# L- \5 z
- , o& s+ ?/ @% L7 D
- ### Doing the work ###
' j, g, M4 c/ _ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# L- W- u+ h3 A, R - the perquisites right, just open your server.ini file, and add this section at2 B( }( \9 T* C# x. g2 V( @
- the end:) J; M; ]. N- j+ _8 ~ C' q2 U3 I# e
- ---cut here---+ s& |% ?0 \8 c7 n# K2 y( @
- [DBEXPRESS]
( ~3 Q- f1 X, K& P( o8 S - sqldir=mysql_sql5 K6 S% l$ K; } r% }5 q
- Drivername=mysql% `8 U: l$ r0 q- l+ o$ n6 _ d
- Database=Your_Database_Name_Here/ X; t2 F" E @ N# B' U: e2 q. Z
- Hostname=The_PC_the_MySQL-Server_is_on
3 c q9 |: `* A$ L* D4 Q - User_name=User_name_on_the_MySQL-Server' s5 t) n+ h! X4 [# g# q
- Password=Password_to_go_with_above_user_name
; R0 c+ e( p& F$ H - GetDriverFunc=getSQLDriverMYSQL8 h- N ~$ Q0 y! f& s; c% a
- VendorLib=path_pointing_at_your_mysql_vendor_lib$ x' Y6 b& ^% y. u9 _/ y" \3 J3 j, O
- LibraryName=path_to_libsqlmy_libary
8 g6 ]) ^4 I5 @; S! h - Active=1" o9 ?1 a" W5 l
- ---cut here---
9 F+ d! a2 Q- N: ~7 u, Q; T* o. I1 l - In my environment (a linux box with a MySQL server running locally) I have:7 h/ V D7 H0 ^
- ---example---) @9 F7 H: v( i w# D
- [DBEXPRESS]
, A* i2 y d! @1 @8 Q* Z% h& r - sqldir=mysql_sql4 p2 o5 Z2 R" a* s* d6 ?! e
- Drivername=mysql! b5 n$ u9 b, ~: d6 M3 I
- Database=test0 y \, A: e- R+ X S- c9 L
- Hostname=localhost
2 X1 b$ w( [4 `* k' ~/ y - User_name=testuser+ C, \" X8 o4 d7 |2 L
- Password=my_password6 N. {3 H4 h! q0 f/ ^8 ~
- GetDriverFunc=getSQLDriverMYSQL* _( { B! E! Q' s. Z3 t
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
0 d, x( t) ~% p; ~4 T8 ^ - LibraryName=./libsqlmy.so' k( T# H- V7 v/ q3 f2 F' r
- Active=1
+ K" g' P* J4 y& J - ---example---2 k& I6 {, E% P
. |8 g0 i4 V+ B7 v- On a windows box, also running the MySQL server locally, it would be:1 c4 \8 Y/ Y2 x6 N7 m/ T }, t' }" H
- ---example---5 N) @# A3 s! a+ }
- [DBEXPRESS]1 X5 r, l: j1 k' y2 m$ e7 s. T- O" K
- sqldir=mysql_sql
5 t/ @0 o" N) G$ t7 |$ Y# a - Drivername=mysql
" y% R5 n5 ~5 I$ y6 j - Database=test
8 ]0 |- u8 I/ U5 G# p2 e- m+ R' U - Hostname=127.0.0.1
3 Z1 D h: i: b7 r) e+ C - User_name=testuser
! E6 j2 {* m9 m# ]( ~4 {/ z - Password=my_password. f0 U5 B" D4 U/ b
- GetDriverFunc=getSQLDriverMYSQL& u% b) F5 u2 q! `7 b
- VendorLib=libmysql.dll
( R# ~2 _1 N5 O8 s3 e. p - LibraryName=dbexpmysql.dll
: u0 P; N7 ~5 c1 E4 Z - Active=15 \; T; k4 M" s
- ---example----
* D; c! x* U8 ^3 c2 H+ H - - written 02.03.04 by pwk.linuxfan( J* l% r, L( x7 i9 a! {
- 5 Z4 J3 U; H( X6 \* Y
复制代码 |
|