|
|
麻烦翻译一下,下面这段文章:xhan 4 D' |7 A: a! A3 j P" R8 y
' q, t( G" \+ F5 a, P
- l3 E. \! v1 d
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ###### g; w" N$ h& r& o2 ?1 l
# V* i) E( ?% f# N; E- ### What we need ###2 n& m/ J) A/ s- i( F8 ^- o
- Naturally, we will need a MySQL server to store the data for us, this document 3 f/ l, c' t4 [
- will not explain how this can be done - there are documents out there for the + h9 f" ~- e8 l u. ?# U0 F% n
- interested. The requirements include a (empty) database for TeamSpeak to use
! P3 | P, c5 F% Y. }# N - and a user account (username + password) that has the permissions to do stuff5 `- E; {( P3 n& q. m p
- with the database. Additionally, you will need a vendor library installed on the" i/ M2 H% V G
- local machine, this came with my MySQL install.' a3 o4 A/ L( L, r2 m0 W
- These instructions will not tell you how you might transfer your data from the: X/ M& V( F, f0 [, X1 ^
- SQLite database to the MySQL database, we start with a clean and empty MySQL
" A) G* N5 e, y/ b, K - database. Q$ p& R2 Z# f/ D; s) j/ e. U
- Some users have reported ways to import a SQLite database into MySQL, but at ~- i. q) J/ D
- the time of writing, there are still too many issues - check the current status
8 z, p' ]0 V2 {: y3 L - in the TeamSpeak forums if you are interested.
0 t$ k) L( D8 a; x7 ]* [ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) U# @/ r! M' M/ w9 _: v. J
- Borland was used. This driver can only interface with the client library that
+ ?0 y B$ J" Q - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' P. C. X" m7 ~( d - client library - basically all you have to do is to use a 3.x client library as
# {+ O1 E# g9 r3 f - "VendorLib" and a 4.x database to connect to.3 S- z. @% i( q' L
- If you need more info about dbExpress, you can contact Borland.
0 T2 ? v2 s5 E: r- | - . S9 u) w$ t1 @! G w( o4 ]
- ### Doing the work ###
3 |7 I" s0 V7 r# j/ x2 Q1 U. k - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
! W' ~' _' ^8 f8 D0 y5 a; K' P - the perquisites right, just open your server.ini file, and add this section at
T) C6 p( |# A* k2 Z6 J( X, | - the end:
: ~" U) P1 U) y( W! g2 g - ---cut here---" C7 R3 ]: d- G b+ `' W. `
- [DBEXPRESS]
0 _' e1 l# i; O& Y5 e- B. ]2 W1 d - sqldir=mysql_sql2 s" k2 l) b2 t) `* L$ R& m( O
- Drivername=mysql9 |9 Q. A1 F0 }4 _0 u( o" @
- Database=Your_Database_Name_Here; o" y# [5 c$ T/ c) F- |
- Hostname=The_PC_the_MySQL-Server_is_on6 Q1 P% f1 Q4 ], R7 q$ \
- User_name=User_name_on_the_MySQL-Server
1 M) o! W9 ]; d/ d& G# d0 K0 O& i - Password=Password_to_go_with_above_user_name3 K) H% h: ]2 H5 D+ g3 U
- GetDriverFunc=getSQLDriverMYSQL
) ?& c/ w8 ?6 ?9 { - VendorLib=path_pointing_at_your_mysql_vendor_lib
- e, X0 K2 v; a; c - LibraryName=path_to_libsqlmy_libary
" ^% I* A0 Z% r - Active=1
3 l5 ~2 Z/ S8 ?/ h9 q0 J5 i0 P - ---cut here---
: H e, L1 G8 x3 n- K( o# Y. d - In my environment (a linux box with a MySQL server running locally) I have:
; f. ?" o, S6 T2 O$ H - ---example---) D- c% y( v" M% E
- [DBEXPRESS]) M5 h7 g: c# D8 z* b
- sqldir=mysql_sql: q6 n6 v/ N! _9 q2 k
- Drivername=mysql
! G4 w" v5 r i+ A - Database=test( s% H# V+ C' N" C5 h
- Hostname=localhost* A- y$ Q# q" m
- User_name=testuser7 v3 `% h: e5 \5 l! |7 N
- Password=my_password
4 k2 d- @# N5 Y0 k5 n7 \ - GetDriverFunc=getSQLDriverMYSQL8 n. r; u7 W; @) ~2 r7 H
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 h& _9 h0 l7 r" j# }. u - LibraryName=./libsqlmy.so
0 i/ L0 U' F i4 Y( H* c6 U: E - Active=1
% C+ t' N9 {5 \ - ---example---, n5 x0 ~1 o0 j& o" p9 j$ D
; `$ c! K6 I% `( [' g) X- On a windows box, also running the MySQL server locally, it would be:- Z5 I7 _& q1 }
- ---example---
1 L0 [$ i# I7 j( b: b - [DBEXPRESS]5 ~' J- d3 l) d. G: `4 x% J
- sqldir=mysql_sql* M. ^0 p/ L }, q. w0 D: @
- Drivername=mysql
7 \. a8 a! T8 V0 H) W4 o - Database=test
" J: a& f' I c/ E; r: k - Hostname=127.0.0.1 X/ V9 x" E) Z0 B3 o
- User_name=testuser+ L: M: [/ J$ Z8 b0 [
- Password=my_password
5 T, O) Q" O$ L - GetDriverFunc=getSQLDriverMYSQL
; X2 j8 j6 F! R - VendorLib=libmysql.dll9 I7 ^1 d( q% u$ u4 l! q# J8 ~# u
- LibraryName=dbexpmysql.dll0 j3 ~5 b3 ^9 Q% O/ N9 @$ u& [# e
- Active=1
8 c! V% |) k& `" @ }! s - ---example----
: @7 e" u5 I. f/ H: G& b( K - - written 02.03.04 by pwk.linuxfan
: D; X) z% u/ U( C" J - I, A- I3 E$ x
复制代码 |
|