|
|
麻烦翻译一下,下面这段文章:xhan
8 r9 u/ C& {. |$ V1 _, D& P7 ?# U2 h# [) s$ o+ v
- 1 g/ Y# g- G/ t6 |9 z
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
, B2 [/ B5 H2 E$ t; ~; R2 C/ b - 4 L) ?' b7 |1 N" s3 w F
- ### What we need ###
2 O" ~7 H& u1 K/ }4 ~ - Naturally, we will need a MySQL server to store the data for us, this document
3 ]+ h& B+ Q' ^ m% f( r - will not explain how this can be done - there are documents out there for the
( h# R p6 M4 o - interested. The requirements include a (empty) database for TeamSpeak to use
1 Z2 P- h6 ~1 S$ ?& A# F9 C; y - and a user account (username + password) that has the permissions to do stuff
: B1 c& y; m" l6 V - with the database. Additionally, you will need a vendor library installed on the' v' S! Y. z# Q* x5 \% r
- local machine, this came with my MySQL install.3 |9 x1 f$ Z, h( ?
- These instructions will not tell you how you might transfer your data from the
" D" @* l+ S3 d. k) r6 j - SQLite database to the MySQL database, we start with a clean and empty MySQL( O* z, s/ b2 y# {7 Z: n
- database.
( y/ x: k1 w4 ^ - Some users have reported ways to import a SQLite database into MySQL, but at
0 Z1 O8 G' {- d" T - the time of writing, there are still too many issues - check the current status; w4 s" ?( x& Z4 U x
- in the TeamSpeak forums if you are interested.
* ?/ w0 Y8 b! G6 {! H+ N - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 b; v2 d9 I/ t7 S9 h - Borland was used. This driver can only interface with the client library that
( V& M9 ^: a9 K6 b$ [ l5 o - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this/ \7 q5 ~/ S" [2 D: j
- client library - basically all you have to do is to use a 3.x client library as
- q2 @7 M( P! f- _5 j) z& @8 L - "VendorLib" and a 4.x database to connect to.
! n+ i- o6 X0 M - If you need more info about dbExpress, you can contact Borland.' P% i2 i+ X( _4 O$ n1 K- L6 U& t
6 Q0 I: z' F2 ?2 }- ### Doing the work ###
7 `, S6 p: o _9 k - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all N$ @8 ^" l' Z
- the perquisites right, just open your server.ini file, and add this section at5 B# b/ Q& r9 l9 F
- the end:
% O3 v. p7 O, @/ {& D# C, m - ---cut here---
$ K8 p- }9 x5 X' J8 T' r - [DBEXPRESS]+ j) q% ?3 G' P( F! C0 G: P" Q
- sqldir=mysql_sql
7 F1 o# t. D L9 S' x' } - Drivername=mysql
; q6 G: m- s$ s. Q% G4 m. @ - Database=Your_Database_Name_Here
: W9 w0 l5 H) \+ \. }7 K - Hostname=The_PC_the_MySQL-Server_is_on
5 b4 R6 q* Q C! \( _2 s9 \0 } - User_name=User_name_on_the_MySQL-Server
% e+ j6 W: n/ c' h! S) o1 z6 w2 t - Password=Password_to_go_with_above_user_name) _, V' |# ]4 S) L! w
- GetDriverFunc=getSQLDriverMYSQL
3 y. M$ r- P4 T. Q4 f# C( B - VendorLib=path_pointing_at_your_mysql_vendor_lib+ [$ b. V: K* U- j9 B3 @0 x: ?
- LibraryName=path_to_libsqlmy_libary/ W6 ^5 _/ C' o- e# d8 N- I
- Active=1" i; Q' g$ e. K! X4 a) Y; N/ X
- ---cut here---8 \* B) Q6 G4 ]& u, J" `! E" u/ z3 T
- In my environment (a linux box with a MySQL server running locally) I have:
; h# e: \+ o( A* M1 o, a& Z( q - ---example---
1 ~ R' q, t5 s0 }: a, K7 N - [DBEXPRESS]
M5 Y) O% d6 m/ |# B - sqldir=mysql_sql
% o- i3 q& { y: c - Drivername=mysql, A4 d3 \0 d( p+ l0 q% L8 f) y
- Database=test0 d, h7 F7 @% Y: R3 g
- Hostname=localhost
0 C7 r: C; x/ M) P - User_name=testuser
5 z7 ]+ i- I; W2 o - Password=my_password
8 z& `/ R' `% D3 ] - GetDriverFunc=getSQLDriverMYSQL; b- k. W2 u& [9 E% A' G. w# x
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
/ c, B' {. g2 }; d - LibraryName=./libsqlmy.so6 C0 _# z* H6 X9 U) s
- Active=1
t: N2 U: R. D& u - ---example---
$ g5 K% y" q! R( {0 j' l$ @# \
# Z! {+ D. ]$ ~6 x! j- On a windows box, also running the MySQL server locally, it would be:
/ y( _% t0 w$ M: U" h% O - ---example---
8 ^2 J' v5 a: V# r4 m - [DBEXPRESS]
7 I% o9 i! G+ L) \" _3 n- ~ - sqldir=mysql_sql3 u0 C/ V7 P: s: k. H+ c$ U' Y8 B
- Drivername=mysql
5 {) M2 Y' t% T - Database=test' i/ n, P" _2 `7 a! w
- Hostname=127.0.0.1
V) a6 X4 _. B" o3 v/ _- d - User_name=testuser! a3 c! \/ N! _3 k; o7 z3 l$ X
- Password=my_password% [& n1 d6 |9 @- B4 i
- GetDriverFunc=getSQLDriverMYSQL
( w9 s4 Y |5 ^! G/ ]0 I - VendorLib=libmysql.dll
5 l- C% l3 O( _1 E* w% _, G - LibraryName=dbexpmysql.dll
9 Q+ H) P) @% u9 X i# l. T; c - Active=1- o3 L0 l% D9 ~
- ---example----+ h3 U7 D4 H7 X- x8 `4 v9 j
- - written 02.03.04 by pwk.linuxfan) J% Q. o1 f! A3 x0 q$ t/ c
- ' L% M! \/ b) U
复制代码 |
|