|
|
麻烦翻译一下,下面这段文章:xhan 5 h$ t2 \1 K4 j0 i0 g0 u! r
8 y+ [2 Y; \* `2 t O. u8 j-
; m W. a \9 x6 z( D7 z: i5 e+ K$ T - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; B7 \, X$ d M2 ^( ~! X% {
. F5 M& \5 ?7 W- ### What we need ###) R ~0 L" {& A3 q# R
- Naturally, we will need a MySQL server to store the data for us, this document
- u, E5 k0 b* ?7 j- d# [8 ` - will not explain how this can be done - there are documents out there for the " t9 k6 Y: ~* x* O! L
- interested. The requirements include a (empty) database for TeamSpeak to use1 o0 W6 r/ Z4 z
- and a user account (username + password) that has the permissions to do stuff
T! Z( F, y/ @* i - with the database. Additionally, you will need a vendor library installed on the3 q. X( S3 f, u
- local machine, this came with my MySQL install.
8 P8 K1 r3 w0 A/ F, [3 i - These instructions will not tell you how you might transfer your data from the' g, E0 H* P* ?( Z% Q1 E7 ^, z
- SQLite database to the MySQL database, we start with a clean and empty MySQL0 z4 j4 q! ^4 I1 l/ N
- database.
4 u$ B1 s# P! y. n! f - Some users have reported ways to import a SQLite database into MySQL, but at
5 I6 k/ n7 |8 |% f9 v - the time of writing, there are still too many issues - check the current status
$ V. }2 H: g+ k: a5 ^$ o - in the TeamSpeak forums if you are interested.4 ^% \9 w% `7 |( L4 p. v' @5 ]
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% |5 D9 O) W+ {
- Borland was used. This driver can only interface with the client library that 0 L6 o' P+ _' r: v' Z8 j! {+ B# V3 x
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 n6 H2 Q) @+ ~: V2 ^ - client library - basically all you have to do is to use a 3.x client library as / b& z! t( }1 v' h
- "VendorLib" and a 4.x database to connect to.1 I1 m) l! }- _* }. O
- If you need more info about dbExpress, you can contact Borland.( P0 e9 T; U& u) J/ l5 F6 h
- 4 }) m' T6 @4 }7 j6 I# k
- ### Doing the work ###2 S8 y8 A1 D5 \9 K& c
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
" L" a) r: i' v' b( M; M - the perquisites right, just open your server.ini file, and add this section at8 E- z5 v) _5 @! P
- the end:
/ l4 _% G4 D: T; m$ \7 E - ---cut here---
$ ?& r/ t9 c' b$ j - [DBEXPRESS]
5 u/ Z0 f% {* V - sqldir=mysql_sql
a5 w5 H# Y6 l( | _; y4 B6 f - Drivername=mysql
: q; Y" d" Y. D5 @- C - Database=Your_Database_Name_Here1 O: p6 r0 }5 z. Q+ `' K5 ?
- Hostname=The_PC_the_MySQL-Server_is_on
3 L6 J, U& B, c1 B3 r1 q: e - User_name=User_name_on_the_MySQL-Server1 O" {- t" D* ~. v
- Password=Password_to_go_with_above_user_name
9 K5 q ]2 x& a" g& e8 T/ F8 ?5 M( q - GetDriverFunc=getSQLDriverMYSQL: Z6 Q* s# ]8 N- K1 f# _
- VendorLib=path_pointing_at_your_mysql_vendor_lib
+ d8 I9 e" e' {5 u - LibraryName=path_to_libsqlmy_libary; u8 U8 N( f; U4 H) B* ~7 _
- Active=1
& f, ?. ^- k7 w) p - ---cut here---3 O) |7 T( o. O j" L& y9 w
- In my environment (a linux box with a MySQL server running locally) I have:
7 r+ j: \4 W! M6 F1 x G, ~+ X: n - ---example---" t7 d: E: k" p3 K
- [DBEXPRESS]2 V8 I7 I) e% A/ N
- sqldir=mysql_sql
( j6 e" E3 v( y$ q0 J8 o - Drivername=mysql
# `- ~, e- x4 i0 m j& t. @ - Database=test2 E, a8 V4 e- k8 E% E1 H
- Hostname=localhost
4 ^- z- D* Y4 _' y5 ]" I6 W - User_name=testuser1 ~4 l, s" _+ K% {/ W) Z' L! y
- Password=my_password
1 }5 _2 d; c9 r& D( a1 O - GetDriverFunc=getSQLDriverMYSQL1 W+ A% g# a0 T
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- ^0 Y0 e7 h" m5 S' v. O9 \
- LibraryName=./libsqlmy.so
. W* k5 {8 E+ P5 N9 E$ K: W - Active=18 t. A+ `: O4 k% Y
- ---example---
5 w' U8 I& b5 F3 o# G1 }0 X
: J; i0 v" M& S4 x- On a windows box, also running the MySQL server locally, it would be:
" Z: G$ h9 s |7 m" F- N - ---example---7 ^" F+ Y4 J' }! k) `8 |9 X7 u
- [DBEXPRESS]1 @7 f& w* ?4 ^5 F: V
- sqldir=mysql_sql* \& b( R( M1 B* C8 _
- Drivername=mysql
6 o1 I' q1 h+ K% [' N+ A - Database=test
# N4 G. k& G* x* @+ _8 Q& { - Hostname=127.0.0.1+ r' q# w' B3 i/ J" c0 P+ v9 M8 x
- User_name=testuser. E- R8 u, G+ e6 }! @$ X
- Password=my_password- R) x. S# `1 `& Q/ L7 Q2 o; @
- GetDriverFunc=getSQLDriverMYSQL) w* U. s9 h+ o4 R" O% ~
- VendorLib=libmysql.dll
$ I" f: L2 o u3 w - LibraryName=dbexpmysql.dll" J3 B1 [( |' @; O3 u4 r3 l
- Active=1& H k8 v* Y7 u# F
- ---example----* _5 j U' K: P" O v- g* D) E
- - written 02.03.04 by pwk.linuxfan
$ B6 d$ \& Q" m
2 {% ~- S1 L+ o( S+ f
复制代码 |
|