|
|
麻烦翻译一下,下面这段文章:xhan 9 P( ]: \5 Q2 w) \$ t) R- I' p
6 b- s' s, r R2 C
-
2 [, K& x7 g! a* z) F$ Z# W - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 P5 ^! a- ?+ a4 d0 o2 R2 u. |2 V
- & o$ R; j. F3 u( t+ I+ \6 U( @
- ### What we need ###
0 q, b/ J5 N1 Q, O3 D - Naturally, we will need a MySQL server to store the data for us, this document
" @5 n% N) h( |9 U/ G. e6 h - will not explain how this can be done - there are documents out there for the
8 \% A" J' f9 {* _9 b - interested. The requirements include a (empty) database for TeamSpeak to use
6 X' d% I s% d - and a user account (username + password) that has the permissions to do stuff8 |! ? {, {# h9 \, E" t
- with the database. Additionally, you will need a vendor library installed on the
/ {% j0 h% D4 ~0 s - local machine, this came with my MySQL install.
) D( J! x+ r7 Y) o$ L - These instructions will not tell you how you might transfer your data from the0 s. _ Q, E& S) i4 G( Y
- SQLite database to the MySQL database, we start with a clean and empty MySQL
0 W1 d8 w7 x/ R5 o. v; l - database.2 `* G8 J' T( X' b
- Some users have reported ways to import a SQLite database into MySQL, but at
3 f4 g9 [$ L* ~5 n. i. D3 ] - the time of writing, there are still too many issues - check the current status
8 {* v3 b# \; H# l2 p - in the TeamSpeak forums if you are interested. @8 B" |) K+ i. G% ~! F
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- Z: |6 q/ w1 Q( R5 L/ q) T& N5 ]7 O - Borland was used. This driver can only interface with the client library that # { \: L7 B& w7 c6 ^. M
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 K; t, J4 Y6 e* p
- client library - basically all you have to do is to use a 3.x client library as
4 ~' o/ G5 _2 A' D/ O5 h - "VendorLib" and a 4.x database to connect to.. }, x. o: z$ ?
- If you need more info about dbExpress, you can contact Borland.* I$ ?5 c$ r9 L- `
/ G ?# ~# N- g/ u" G- ### Doing the work ###% E6 _+ [$ X! s9 I
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all x- C: Y% e% j2 m: ^5 q; F
- the perquisites right, just open your server.ini file, and add this section at
, g! b/ g) W- o* C - the end:
6 N! K5 T" O4 T- e1 T - ---cut here---7 S4 }' _+ Z$ D( @
- [DBEXPRESS]7 f9 J7 R& b* ^! `; k' d
- sqldir=mysql_sql
& Y# p' x& Z! J/ Z7 w- S - Drivername=mysql8 S0 t/ N/ c; R! D+ p3 T
- Database=Your_Database_Name_Here1 i+ h! T5 ]2 S3 J
- Hostname=The_PC_the_MySQL-Server_is_on* o3 n7 {" ^, s; ~ `, ^# Y
- User_name=User_name_on_the_MySQL-Server/ r+ x* O2 c3 V0 n
- Password=Password_to_go_with_above_user_name
7 `6 o8 p' ^. d. a5 Y# Q- T - GetDriverFunc=getSQLDriverMYSQL
+ }4 e8 e* [1 Q9 F( H4 {1 s - VendorLib=path_pointing_at_your_mysql_vendor_lib
& i- P$ \4 o" @2 l2 K; I2 l+ U) B5 ` - LibraryName=path_to_libsqlmy_libary
# p. d/ M$ _. V7 W+ ^0 A - Active=1
" h* `, s/ [, g0 o- c - ---cut here---2 ^- H( Y$ m# V
- In my environment (a linux box with a MySQL server running locally) I have:2 u1 ~4 E% ?1 ~* K' i. `- ^7 F
- ---example---- S2 `, l: u0 X1 j9 v$ [
- [DBEXPRESS]
- N% {2 B! ~: ^' V0 ~0 i - sqldir=mysql_sql
5 C$ j0 S4 w, W; e- _/ z - Drivername=mysql1 J! E2 t! ^; J& P1 y! @3 T9 n
- Database=test
/ o! l* c5 ^5 j, t - Hostname=localhost
; E w0 x2 N3 a- T+ ^ - User_name=testuser, W' R, ^' }+ ~& q l
- Password=my_password
% v3 j" d/ Y! K1 _ - GetDriverFunc=getSQLDriverMYSQL/ D7 a1 _% y! J) @; K
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) Z( Y( L7 R# [, M* M% p
- LibraryName=./libsqlmy.so
$ Q8 q( B! s5 C - Active=1. h/ Q; K. K7 {/ S
- ---example---
' ^5 J& V' h3 Q ~; ?! ]
- d" E2 V5 j* J, u- On a windows box, also running the MySQL server locally, it would be:
6 }( \1 \: Z# a9 Q8 I - ---example---" J; R, u5 o B8 @( d
- [DBEXPRESS]8 f2 ]5 F; U; W3 P$ T3 c
- sqldir=mysql_sql
O. {+ e( V% u) Z9 c \ - Drivername=mysql
. E: K4 u F" U6 q4 X* N! R - Database=test4 Z8 b& N+ p; d
- Hostname=127.0.0.1
& o" G- E) I4 r - User_name=testuser
" @0 f: k N$ j+ z - Password=my_password
0 w& F; C( x) H9 T7 K3 L& o - GetDriverFunc=getSQLDriverMYSQL
7 k; S" o/ Q. X - VendorLib=libmysql.dll2 R8 {2 s8 {) K; H' `
- LibraryName=dbexpmysql.dll) L6 C/ R, t" f- t, [
- Active=1
! k J! _$ @# o - ---example----" n, J5 ^; j$ C( n, {4 l, @
- - written 02.03.04 by pwk.linuxfan2 r: {7 t% Q4 V2 v6 M
- ! i5 O% ~+ b0 {: m7 i+ u
复制代码 |
|