|
|
麻烦翻译一下,下面这段文章:xhan
1 Q) d( f) z$ I; x/ u6 e. P3 a) A9 T- G3 f# O6 {
-
, Q: H* k5 w0 p" ?2 a: g- g - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 d7 e7 d0 K5 m9 o; f" h/ u3 F
- ! E/ C# M3 ~$ [. K' O# `5 b' q7 g& N
- ### What we need ###
6 p% M. G" F8 {8 ?# } - Naturally, we will need a MySQL server to store the data for us, this document
# r1 {2 X7 F9 C; R ?! _ - will not explain how this can be done - there are documents out there for the 8 q5 }+ ^4 Z2 n3 ?3 d
- interested. The requirements include a (empty) database for TeamSpeak to use
* L0 r( z. _& u" T* v) A/ c - and a user account (username + password) that has the permissions to do stuff8 t0 y8 o* a$ Z! `! M W, c0 D
- with the database. Additionally, you will need a vendor library installed on the8 y n2 S( b( C& h+ U
- local machine, this came with my MySQL install.
5 G) \/ P6 G1 i/ |& z1 p0 u7 O - These instructions will not tell you how you might transfer your data from the
# J1 ^* a# u# G+ ]7 ^ _6 I0 ] - SQLite database to the MySQL database, we start with a clean and empty MySQL3 T9 ]" `- H& c/ L
- database.( ]9 C7 B( `: ]# s& y5 Z4 _7 S
- Some users have reported ways to import a SQLite database into MySQL, but at* o* L7 t0 I3 `/ @4 A; Y7 F @
- the time of writing, there are still too many issues - check the current status* s# Q! V( L4 H; B! r
- in the TeamSpeak forums if you are interested.
$ O0 `! V1 D: {5 B - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
5 s, u5 F5 w9 I% n; ~ - Borland was used. This driver can only interface with the client library that 4 x/ d) x, W& [5 G- s
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 {5 m$ d) o% p' \ - client library - basically all you have to do is to use a 3.x client library as
( v9 k2 ]6 `4 y) ~0 o - "VendorLib" and a 4.x database to connect to.
6 w; h. e5 D5 x' B' n m/ n6 e* o - If you need more info about dbExpress, you can contact Borland.
! R2 n4 @% @& h
7 u; M% O! x* Y2 e( Y- e8 F- ### Doing the work ###9 n( R6 W9 g- ~
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
9 \2 M% r2 F" g1 K7 c7 q - the perquisites right, just open your server.ini file, and add this section at5 ?% K+ o; v0 J3 ~' x
- the end:$ l( N; A7 j; e6 d0 T
- ---cut here---
3 ]' t1 _" }, m {9 c; @: b - [DBEXPRESS]
; e* f" v( ^3 g: O( Y$ ]5 I - sqldir=mysql_sql5 C) I$ g* A" h/ z
- Drivername=mysql s/ _& r% f* Z, e# ]" V7 m6 u
- Database=Your_Database_Name_Here
" S5 s u: f; j3 g+ Q& i - Hostname=The_PC_the_MySQL-Server_is_on: q' f) u* P% b$ ~# l
- User_name=User_name_on_the_MySQL-Server# j: Y9 G, l: q
- Password=Password_to_go_with_above_user_name% x4 x( v |6 b" \! K1 T
- GetDriverFunc=getSQLDriverMYSQL
j3 f2 W9 v( p6 {% |9 ` - VendorLib=path_pointing_at_your_mysql_vendor_lib
' D0 `5 A3 u( p, `8 A, N - LibraryName=path_to_libsqlmy_libary
9 s4 X2 n% I7 u7 T5 Q1 S - Active=1/ A3 k' V' [7 f8 r
- ---cut here---; S: D5 }( V# ~5 Z. l
- In my environment (a linux box with a MySQL server running locally) I have:
: G# e- `' t! K6 J - ---example---7 a: b/ i( I/ A8 {7 `
- [DBEXPRESS]+ Q0 Q: h( u+ u# C
- sqldir=mysql_sql4 |$ V7 |2 I; u# U v2 m
- Drivername=mysql
' ^& ?" x6 a/ Y& O. E - Database=test8 r7 _5 M9 H1 L: `. o
- Hostname=localhost% r, B8 C7 ?" K2 p w4 u d: g% i
- User_name=testuser
% T7 J7 [1 X& r - Password=my_password
' V& j4 ?- |& e% C' g+ a0 `3 R# c# [ - GetDriverFunc=getSQLDriverMYSQL
& ^+ l) ]' u; ]+ s8 ]7 d6 U - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. X h" S& {0 O5 w4 ~8 k! a0 ~, Q. c
- LibraryName=./libsqlmy.so/ P, J* E Y U9 x
- Active=1% }( }# t+ n/ o* H+ v
- ---example---
^! R6 P" I) A8 _7 y$ q* F/ \- T - 6 ?0 Y; n+ {# e* ^! l' Y0 A
- On a windows box, also running the MySQL server locally, it would be:/ E4 g! G+ X! d3 p; b$ d
- ---example---4 x2 `& q; R7 r) O
- [DBEXPRESS]
, m" l! j: D2 \ - sqldir=mysql_sql
- x0 k. ]) j) L( M* ` - Drivername=mysql/ `, O+ A A! s$ v8 m
- Database=test. a, E2 c: u7 U S) D4 N+ @1 _2 f
- Hostname=127.0.0.1
% {2 [" @: J% ] - User_name=testuser2 K; S2 K y0 X7 L) u
- Password=my_password
$ Q1 g& j& g0 ^. I$ F; v1 t - GetDriverFunc=getSQLDriverMYSQL# H( D/ R: i( s" @
- VendorLib=libmysql.dll. c x( F1 Y- `. J/ y9 K, ?
- LibraryName=dbexpmysql.dll- N0 m7 t( @1 ?; {$ t! }, }, ]
- Active=1
$ U+ T h% `) b1 T. N - ---example----( e' X" Q8 g! D( m
- - written 02.03.04 by pwk.linuxfan
- J6 T6 ]! |% `4 z - ) Y' R1 S# R2 J) r
复制代码 |
|