|
|
麻烦翻译一下,下面这段文章:xhan + g3 z9 o' k: V: R
; ~5 U* ~6 t. f) T2 [1 }# [- ; a2 W+ X9 ~4 R6 _$ M8 e" Y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
: K" K* W4 T c: J# D' V9 g
0 p9 Z; f' O d/ }- ### What we need ###
; g* t+ H M! V, ]) y1 |" U) ]3 K - Naturally, we will need a MySQL server to store the data for us, this document
; h! U$ A1 `, R- A; [3 Y0 o - will not explain how this can be done - there are documents out there for the
# W8 E6 U( J H+ c* X, P, C# Y3 J - interested. The requirements include a (empty) database for TeamSpeak to use1 r/ x1 I- }( w" J
- and a user account (username + password) that has the permissions to do stuff0 Y0 u& U3 N1 W
- with the database. Additionally, you will need a vendor library installed on the
9 B8 e9 G1 J8 O K( b - local machine, this came with my MySQL install.
8 S3 V' j1 Q, S( w2 ]8 u - These instructions will not tell you how you might transfer your data from the
- [/ C. R0 x# g& p. I* k0 r4 e - SQLite database to the MySQL database, we start with a clean and empty MySQL: h; s( \6 @. M/ q
- database.8 ~$ p; q: W7 C' q8 T1 `$ Q5 ]
- Some users have reported ways to import a SQLite database into MySQL, but at$ Q5 ~5 L- X/ x, V& B4 N
- the time of writing, there are still too many issues - check the current status' I7 n' f" { I" g0 s! {1 u& ]+ H$ ]
- in the TeamSpeak forums if you are interested.3 T& a$ V4 g% P" {4 M
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from+ V$ f4 V' r& M4 {0 s& P8 a
- Borland was used. This driver can only interface with the client library that
( Y1 T4 [: F4 w# v- G. L - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% S; \5 \2 W& _5 C J1 h u0 B( ?2 S - client library - basically all you have to do is to use a 3.x client library as
6 M) t0 P* _% m/ i! ] - "VendorLib" and a 4.x database to connect to.
, x6 w& g) i0 I# J: B - If you need more info about dbExpress, you can contact Borland.
2 ?2 k1 a7 v5 |3 E5 b- u
4 u! B+ s* t) x, j& `6 b% x- ### Doing the work ###
# s% Q7 X5 B# B; P: ^1 d. E( _ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 p) c/ `& F! ~( u5 r' j
- the perquisites right, just open your server.ini file, and add this section at
9 v. |$ {& }- Q' h' v, J) q - the end:
7 z9 d Z+ ]- u, z/ A7 V" M% i - ---cut here---
' p9 x% u( i: {+ e( m% Z; v - [DBEXPRESS]* N8 E8 m) Y6 v1 X
- sqldir=mysql_sql
1 K' Q8 s* @9 E - Drivername=mysql l# E0 K6 K2 `8 J \4 q+ z: T) I- S
- Database=Your_Database_Name_Here( x% l; \; U/ H# `9 {/ P
- Hostname=The_PC_the_MySQL-Server_is_on
' h4 i* L6 ^& q; Q5 \2 A - User_name=User_name_on_the_MySQL-Server! ^) m# a9 F7 g$ C! \
- Password=Password_to_go_with_above_user_name3 j: |* ]: i& H* \% D x
- GetDriverFunc=getSQLDriverMYSQL7 c1 Q# [8 D1 C2 J9 \ k4 o
- VendorLib=path_pointing_at_your_mysql_vendor_lib
& l0 N+ h9 T. U$ O% Y - LibraryName=path_to_libsqlmy_libary3 P% W0 O' _; }/ k& k6 b* T
- Active=1
8 K, a( a$ ?: p( R$ S' j* \9 u' a - ---cut here---) p/ x3 X4 [; F
- In my environment (a linux box with a MySQL server running locally) I have:) ~0 h7 F6 Y. x. |2 x
- ---example---( _7 g) M9 F5 z1 ~; t
- [DBEXPRESS]
$ R' G; O4 J' M1 b( @- G - sqldir=mysql_sql" w, ?7 {& o% A7 f: m- b6 j
- Drivername=mysql
- I7 V3 G/ ?7 r# G$ A - Database=test
\1 s3 Y$ p1 V9 n; W: r - Hostname=localhost
6 e2 H# I' s2 F) i# p6 i - User_name=testuser: {- Q7 x2 a8 R- q& H* C' W
- Password=my_password
4 z5 Q+ B& Y R - GetDriverFunc=getSQLDriverMYSQL& D! _& F* b8 }( s! A+ i; Z5 `
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0! z5 j$ w. [' l- o( ?2 o4 g' v
- LibraryName=./libsqlmy.so# q5 B B9 Q* L& L& S
- Active=1 u& j) n9 O3 ~1 j; i, H
- ---example---0 _! @5 B' a, L" L7 K. j' D: ^
- 3 K q9 ]. d- l: G$ t) Q+ A
- On a windows box, also running the MySQL server locally, it would be:. u8 s7 T8 f9 O' s: [( C
- ---example---- m( q3 y, V$ J8 W8 q% M# d @) m
- [DBEXPRESS]
* ^( O& }" p9 l6 }( G - sqldir=mysql_sql
& n' D, ]2 g" d4 X - Drivername=mysql
$ W; e- i: ?+ `: k8 B0 i7 c4 `( B+ N - Database=test; b0 r# U2 _+ f8 Y, X# N
- Hostname=127.0.0.1
! Z6 L7 _5 y9 v0 \! C; d- W0 k# A - User_name=testuser
. D# N' [! t" F5 M4 J& [ - Password=my_password6 u4 n) X7 k) D* x! @
- GetDriverFunc=getSQLDriverMYSQL9 i: _9 w- Z+ Z' q" |
- VendorLib=libmysql.dll
, L G+ F: [7 x7 n/ N7 g. P - LibraryName=dbexpmysql.dll
3 O) v$ W) E" Z+ R( R+ |5 Q9 g8 x - Active=1" E w- {( |' u" N k, v
- ---example----
% ^3 x1 u* A, W; ~ - - written 02.03.04 by pwk.linuxfan
# K2 ^- p, G* ~- P1 X0 ~( S: S6 H& O1 s
# U4 U9 p$ l8 m3 I. K# |- c8 b. s/ z
复制代码 |
|