|
|
麻烦翻译一下,下面这段文章:xhan
9 _# |9 s) {& i
2 l- p! v5 T/ |- 1 ?2 a |# `" W* M9 d a/ I
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 L9 H* q' g% ]+ P
8 p# V. P" C1 M. y- A$ h1 j5 t& c' m- ### What we need ###
, h$ S( ?. S& J" T+ b6 P - Naturally, we will need a MySQL server to store the data for us, this document " U4 S& J8 R2 W M
- will not explain how this can be done - there are documents out there for the
- y! Y6 l% Z% `5 u - interested. The requirements include a (empty) database for TeamSpeak to use# v9 G( S) p# W, m
- and a user account (username + password) that has the permissions to do stuff
4 R9 `# l9 `% A0 X7 d7 ^% D) G - with the database. Additionally, you will need a vendor library installed on the& \, ]3 U- o* a" D0 A: f' f, V) a3 E
- local machine, this came with my MySQL install.2 L( f2 ]; K: J- O6 b
- These instructions will not tell you how you might transfer your data from the
6 ^8 P3 [4 N( S* P - SQLite database to the MySQL database, we start with a clean and empty MySQL/ X4 M. X# H9 V& K; m" `
- database.
- [1 \- F, \+ y' j9 C - Some users have reported ways to import a SQLite database into MySQL, but at$ h; \! B* ~& d6 ^/ |1 L6 {5 H
- the time of writing, there are still too many issues - check the current status9 m: E _/ m0 h- d% A, _- [" K# s
- in the TeamSpeak forums if you are interested.
4 B' N7 Q3 o# ]# V, w - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( Z) |2 Z+ H2 j9 O& t% l6 W9 g - Borland was used. This driver can only interface with the client library that 4 [9 v5 R: M" f/ G
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
9 C0 D/ t1 O" E - client library - basically all you have to do is to use a 3.x client library as
* I& [) \0 d: {, N+ v# x& i, s - "VendorLib" and a 4.x database to connect to.
5 L0 a6 H$ H) z2 `* W# w4 t" {& Z - If you need more info about dbExpress, you can contact Borland.3 F! C% V; B/ D- \' t
- 2 \* r8 P6 n* w& Q" s6 ^7 k2 c
- ### Doing the work ###
- O, G. R8 n9 _; t; @ u - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all; }" g, r) h! Z; p. H1 e. x
- the perquisites right, just open your server.ini file, and add this section at5 P# P4 a% Q* u: y: ^2 E; Y
- the end:& M3 l) q( C8 c% o/ T5 [
- ---cut here---5 q0 G& @! {- h3 R: D
- [DBEXPRESS]
5 I- f+ t5 y" A* R - sqldir=mysql_sql F$ e6 p. { Q' W0 `
- Drivername=mysql" j5 t. H$ i; s
- Database=Your_Database_Name_Here" ^4 _% K2 l( e) D; e" V7 E
- Hostname=The_PC_the_MySQL-Server_is_on
" N% I% z: t$ u( d - User_name=User_name_on_the_MySQL-Server
( V7 D. ?3 L; D0 |; `% K - Password=Password_to_go_with_above_user_name3 O$ h9 U2 K6 } w
- GetDriverFunc=getSQLDriverMYSQL
4 G6 C0 Y; _& d - VendorLib=path_pointing_at_your_mysql_vendor_lib
- b& y$ Q% }" c5 H6 b' } - LibraryName=path_to_libsqlmy_libary6 m' w8 f9 m; X! h2 S
- Active=1
* x6 }" }8 M! L$ ? - ---cut here---4 A" E* |- s+ `3 s0 n* R
- In my environment (a linux box with a MySQL server running locally) I have:
+ L Y; Z+ J- ^: a, l# k- ^ - ---example---
, W# u2 x0 V2 w& a5 U- C) ^7 v - [DBEXPRESS]
% G* B) ~6 W7 s- ^7 L - sqldir=mysql_sql
6 n4 [3 D9 r' j; P5 @# ~5 I - Drivername=mysql2 K+ d7 v/ |8 I$ m
- Database=test
[5 T1 V8 {, z! m - Hostname=localhost
& _; H/ u; @% d: ]+ |" {$ C - User_name=testuser0 _8 b$ O! `* L9 \
- Password=my_password
8 e( @7 P2 O( a# l/ t; g - GetDriverFunc=getSQLDriverMYSQL
& n2 b# U4 o! m1 d' ^- Q5 r/ ~ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( C) P; `/ E: Z4 P
- LibraryName=./libsqlmy.so
( G6 D5 w/ L6 ~1 c - Active=1
1 C8 R5 ^: v& \7 V3 ?+ _ - ---example---3 j1 c- N) C/ Q7 g- }& K* B
- . N- l6 Y+ l( y: [- q
- On a windows box, also running the MySQL server locally, it would be:- d* e" d5 _1 p1 p
- ---example---9 _0 P8 o8 q$ Z% |9 u
- [DBEXPRESS]
. D0 M, q' p$ I1 \3 d. V - sqldir=mysql_sql
0 h t2 d# P2 P3 R9 `; c- o - Drivername=mysql
# Z$ \# \! J- A8 w" E' O - Database=test1 O! b2 n' q5 F( m: e
- Hostname=127.0.0.1
* f0 ]: v: D' ]; y/ Y0 ]1 b' b - User_name=testuser
( [ u3 y5 G1 H* ]+ v9 k7 _ - Password=my_password
' k8 ]( ]- m( P' g - GetDriverFunc=getSQLDriverMYSQL4 ~ h1 P% R, G" z- V9 F
- VendorLib=libmysql.dll0 l' A+ X% b9 ~0 L8 X( F
- LibraryName=dbexpmysql.dll( a% B4 t1 x1 a3 Q' _
- Active=1. x% d( i3 A, W7 P5 v$ e) M
- ---example----3 Q3 c! y; U# S6 G8 t: u
- - written 02.03.04 by pwk.linuxfan
9 I( D% d) }. z; g; S0 S
) ]2 _4 E4 O7 W, h" y
复制代码 |
|