|
|
麻烦翻译一下,下面这段文章:xhan : D) t! X% ]' n/ J8 _
, M+ |+ A7 v$ ^, a/ i/ r- ; n; ^2 I( X7 z$ N1 R4 J) B& D% l( @
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ####### Z2 r* N) r m
1 w1 ^1 g( e% u( {. e; l+ m; E- ### What we need ###& V3 r8 N5 M1 Z& n) f- O i" y
- Naturally, we will need a MySQL server to store the data for us, this document
( U8 O: _ K& X8 l8 _ - will not explain how this can be done - there are documents out there for the
; c( I/ {2 F6 `8 {. w+ l# p - interested. The requirements include a (empty) database for TeamSpeak to use
3 f; e1 `8 {2 Q6 a9 e - and a user account (username + password) that has the permissions to do stuff
! s& ?; Z% r5 @; g/ | - with the database. Additionally, you will need a vendor library installed on the; F; X' _2 `% b* a; q1 @% {8 @9 h
- local machine, this came with my MySQL install.& r+ T$ w6 z' Q+ E
- These instructions will not tell you how you might transfer your data from the
- r4 K/ o" C$ P8 \ - SQLite database to the MySQL database, we start with a clean and empty MySQL
8 p3 C, @, T) \ - database./ i# f0 F! K% P7 y6 q' I0 y/ I$ P
- Some users have reported ways to import a SQLite database into MySQL, but at% a) a) j0 t7 [& K
- the time of writing, there are still too many issues - check the current status
7 e7 p; _" A& x( F7 F - in the TeamSpeak forums if you are interested.
- P, j2 [8 ^! O, V: l) f0 R - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 W$ y$ R F; H% Z7 @) t/ k! U
- Borland was used. This driver can only interface with the client library that 6 `6 a: E) C6 M0 ?
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" q4 o l J) P; X9 p* }
- client library - basically all you have to do is to use a 3.x client library as
# O6 b: M) u& a4 s - "VendorLib" and a 4.x database to connect to.+ z0 O2 ]' w# m5 s7 |) F5 b! [% T t
- If you need more info about dbExpress, you can contact Borland.
: F3 A B7 s9 x+ ~
. D9 A" \+ C4 l$ h( k' J+ P- ### Doing the work ###" v/ G) a0 T) i- J9 b
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
0 t* v1 O. Q* J) ~0 H - the perquisites right, just open your server.ini file, and add this section at2 R, F: {6 n& T- P
- the end:
, o# W1 Z; d) _5 y2 k - ---cut here---
3 ?0 W0 v3 _, A, z7 } E5 {" F - [DBEXPRESS]$ X7 j7 g0 ] n, {8 S' W) i
- sqldir=mysql_sql
+ [; Y+ p" K& d1 L3 p" t - Drivername=mysql/ y7 A# u! } v0 v" O
- Database=Your_Database_Name_Here
, @ b7 g) |: I; Z& g9 h5 G - Hostname=The_PC_the_MySQL-Server_is_on# R' L- z H+ A7 I, ]! Q
- User_name=User_name_on_the_MySQL-Server: `9 s* T/ o; h0 p" j+ t" k- a: }- M
- Password=Password_to_go_with_above_user_name' D V+ w/ r& \; P6 H5 U2 g
- GetDriverFunc=getSQLDriverMYSQL
8 {' U, j5 {5 O( h7 \" E! n - VendorLib=path_pointing_at_your_mysql_vendor_lib
" v/ i- L" z8 m! ?8 `! O! V - LibraryName=path_to_libsqlmy_libary
9 E" D$ q4 |8 B$ A8 _- }8 R - Active=1
4 S2 }- `" i0 c - ---cut here---
( W9 e$ \ F/ m1 _) t - In my environment (a linux box with a MySQL server running locally) I have:! }$ D; k% o% F V$ b \
- ---example---
* @& w3 n- J' ^( j - [DBEXPRESS]: E" D- d" g! k. R6 n( d" P
- sqldir=mysql_sql
& L- r+ j) ~' r p# ? - Drivername=mysql/ S O/ x" s& `8 f
- Database=test
* t( o# }" ~) g1 C) w - Hostname=localhost& w' c0 s6 a+ _3 r, Y s) d
- User_name=testuser: V7 m' {! M/ ^- h) W9 b) y
- Password=my_password& U+ d# J- J0 A* f
- GetDriverFunc=getSQLDriverMYSQL2 @: n$ b+ C' V5 g" M6 Y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.08 R- i* L2 X i" q: r
- LibraryName=./libsqlmy.so. W' H1 J/ E# R' v7 E5 o3 }
- Active=1; g( q7 y9 J" E" j
- ---example---/ u7 o3 {7 ~# G# k0 G
1 w+ e, T4 t b) X+ Z- {* B$ x+ H- On a windows box, also running the MySQL server locally, it would be:
1 _* L7 v1 V) A, d% } - ---example---8 x& }' X; b7 H# k* k7 g! X! ]) g1 T
- [DBEXPRESS]( A& f3 b9 w8 t2 t" f/ U9 S
- sqldir=mysql_sql7 z$ d* v. f, v$ `+ b+ x* j' C9 t
- Drivername=mysql
5 Z" O. R; C' q! O - Database=test
3 U+ x/ o l% R4 g3 k, G - Hostname=127.0.0.1
' e/ Z; {0 \: q+ P0 ~1 b5 R1 [ - User_name=testuser. K V; V) u$ o" a9 V; ?7 I
- Password=my_password
: [; H6 l3 t1 a8 j - GetDriverFunc=getSQLDriverMYSQL
7 n- A# `7 B& Y0 U& V - VendorLib=libmysql.dll
- K% N7 @/ i: b* T) M, a - LibraryName=dbexpmysql.dll D5 P/ F- T- [9 k( p
- Active=1
/ ]; g4 D r- _' |, ?+ R - ---example----
% k# s0 _, X" J7 o - - written 02.03.04 by pwk.linuxfan
/ y0 `6 [8 A' t: v: M - : G' C& t9 z* w# ?+ r8 s
复制代码 |
|