|
|
麻烦翻译一下,下面这段文章:xhan
7 Q- d# T4 N: ^ W: _! l
+ a6 S: ]+ x' f( }-
% ]" L, n W; v - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
' g2 u8 b8 O* r9 l# x# n) r) u- l - - I. _) c; ~& ?: [; u" k
- ### What we need ###2 @3 u, D: q5 z5 n- x. g
- Naturally, we will need a MySQL server to store the data for us, this document
' e) d! w/ T* h. A! }. {# ]' }1 c: { - will not explain how this can be done - there are documents out there for the
4 U* ]" k$ U% t - interested. The requirements include a (empty) database for TeamSpeak to use: O7 s7 ^7 B! l; w; f4 N1 \/ Y
- and a user account (username + password) that has the permissions to do stuff2 B3 K' d" W; X. K
- with the database. Additionally, you will need a vendor library installed on the
( b0 _; r% F) q" I3 }4 l, Z - local machine, this came with my MySQL install." q# V$ A) _4 a; O5 F) }
- These instructions will not tell you how you might transfer your data from the
$ l6 i) K5 C" U$ e& r - SQLite database to the MySQL database, we start with a clean and empty MySQL) w9 H A) K! G0 G1 @
- database.
8 S. u, x" t: g - Some users have reported ways to import a SQLite database into MySQL, but at
/ X6 r4 l5 v: G% e/ l - the time of writing, there are still too many issues - check the current status! m+ R" Y& s5 a
- in the TeamSpeak forums if you are interested.
7 m1 ]& j" l T! _* t+ C - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- X: z, G% O6 P9 `4 G1 U - Borland was used. This driver can only interface with the client library that 8 R0 d# b$ h# v: \+ Y, A
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this) f1 |8 N9 K; e) T% ^$ ? [
- client library - basically all you have to do is to use a 3.x client library as
9 ^/ `- t0 }1 {2 G: Q z - "VendorLib" and a 4.x database to connect to.- I6 o5 D; y/ [; ?. S
- If you need more info about dbExpress, you can contact Borland.% H. J/ u" I# g# \9 t1 Z4 x: j3 Z2 D
% K* B9 a7 @( J1 @" Q* h- ### Doing the work ###
% Z5 a8 x8 H8 ^: W. \ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
, f4 j% [( t6 M) R. n( V& W - the perquisites right, just open your server.ini file, and add this section at
, D- u+ Q9 X6 G. v - the end:2 a. I& u( F5 _4 R% t
- ---cut here---. f$ Y; h, g0 ]$ \7 f8 u$ |: t! m
- [DBEXPRESS]
5 P! Z9 Z. _4 \/ u6 F( A: T - sqldir=mysql_sql
, h6 ^- N7 j4 R/ q O - Drivername=mysql
; d! K4 |+ X, M8 X, Q - Database=Your_Database_Name_Here* O; c! S2 B# L5 N
- Hostname=The_PC_the_MySQL-Server_is_on' v1 P5 j. e+ u9 I
- User_name=User_name_on_the_MySQL-Server
( I! U9 J/ v0 G3 ^! k - Password=Password_to_go_with_above_user_name
! Z) F0 b B& i- z P3 h& Z - GetDriverFunc=getSQLDriverMYSQL
" C" G; w% N8 v- Y, L- @& ? - VendorLib=path_pointing_at_your_mysql_vendor_lib! [" y5 `# C) N1 \2 n0 a: e
- LibraryName=path_to_libsqlmy_libary
! k2 K; w" @# ^ - Active=1
$ P( |: s3 X' v1 v1 \7 X/ t - ---cut here--- y" W+ U9 _7 g+ m/ ^/ m
- In my environment (a linux box with a MySQL server running locally) I have:
; l4 @ i8 I* a: \* p - ---example---
+ ^9 C% O- g3 x& Z - [DBEXPRESS]
7 w2 `# a7 I( y F4 N2 P1 U - sqldir=mysql_sql9 n2 N, M' D2 ]! B* A" {) o
- Drivername=mysql
( k8 P9 e/ e% R, ?3 o) n - Database=test
& ~' I" U3 k2 r* x - Hostname=localhost
( G! e5 b. r5 F - User_name=testuser7 L, `' _5 i4 |, F! T: E' Q5 y5 _
- Password=my_password
, j3 Q4 s6 ], `# q! Q. I - GetDriverFunc=getSQLDriverMYSQL+ @/ A Z% }/ T4 R" z% M
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ v7 b- z$ K9 P4 a( C) u+ Z
- LibraryName=./libsqlmy.so( E, E8 k8 S4 d+ O
- Active=19 i( Y- b/ w) u. v! Q/ ~1 `$ p3 L. c. G
- ---example---
' ]# y$ `- d! D - 2 t8 U* y' a% Y5 H4 a" r
- On a windows box, also running the MySQL server locally, it would be:
1 W( v7 H9 Z/ U; C- D - ---example---
# Y2 ?4 s W1 c2 W6 d: } - [DBEXPRESS]$ S/ x# n( }/ V: s8 P8 D( ~) h
- sqldir=mysql_sql
* b0 [2 Q* P a. t& z) Z+ m - Drivername=mysql
; x+ q. i" ]! m% I3 t$ W - Database=test
6 d' j( U' ^1 L- A5 Q2 B - Hostname=127.0.0.1. Q6 @6 C1 Z5 G: R; G7 P9 o7 G0 C
- User_name=testuser+ G1 S e7 s4 V- R8 E$ O
- Password=my_password
* T. R6 o8 P/ d+ w8 e$ f9 Y5 R - GetDriverFunc=getSQLDriverMYSQL
& c/ ?+ }0 I% h/ G - VendorLib=libmysql.dll3 X, t! p' s6 f$ _
- LibraryName=dbexpmysql.dll7 A- v& _: [. b% k2 R
- Active=1
, q) S1 G: _. }, P$ d, H/ S - ---example----
1 D; l# D3 K2 n# U3 u" N) A' U( O7 a - - written 02.03.04 by pwk.linuxfan
* A+ S6 ^* h+ D$ R0 S/ `
* T6 v, z& Y+ f1 u' A+ n
复制代码 |
|