|
|
麻烦翻译一下,下面这段文章:xhan 0 p3 _) F" f3 r0 \. t% @
% K- `! `$ i- N9 `; ^! x-
7 _5 e1 e9 `" D! c - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
' m+ k K) t; L8 i
5 Z; L5 G2 e- }- ### What we need ###
$ J! n" `4 u- _, W3 E - Naturally, we will need a MySQL server to store the data for us, this document
) \# S" Z, a( l( r! S' h - will not explain how this can be done - there are documents out there for the
: j0 \/ x, L: d: \/ J - interested. The requirements include a (empty) database for TeamSpeak to use
8 a: U: R% x* S5 N: j" R% A - and a user account (username + password) that has the permissions to do stuff
: I/ l3 Y% R0 F - with the database. Additionally, you will need a vendor library installed on the2 _) x; e9 w) X
- local machine, this came with my MySQL install.
& I5 V* N4 P; k% o2 [+ D - These instructions will not tell you how you might transfer your data from the
. l% s0 H# P- s% X( u2 _ - SQLite database to the MySQL database, we start with a clean and empty MySQL
% w$ B" a9 z% i - database.& w5 s. p( r- Q" V0 N4 E( n: U
- Some users have reported ways to import a SQLite database into MySQL, but at
7 D9 G7 b/ ]6 }/ [! N( S$ Z - the time of writing, there are still too many issues - check the current status
- x+ k% w" c# Z2 g. t9 c - in the TeamSpeak forums if you are interested.
0 R( @) I& {- n; m8 X" Q$ n - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from: r" l5 N& R# p# {
- Borland was used. This driver can only interface with the client library that * A4 i9 g2 ^7 Z1 ^0 q+ D2 w% U, N
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 D% C/ K( t, s- H, Q# R
- client library - basically all you have to do is to use a 3.x client library as
, s+ }% P6 G) f+ C5 W - "VendorLib" and a 4.x database to connect to.# s5 J0 U9 G+ D1 u& C8 b% g
- If you need more info about dbExpress, you can contact Borland.$ s# c) V2 v: F
- - @7 h7 i" c; `! Q9 e# ]1 p+ _
- ### Doing the work ###' w$ U, a- d; j3 {% ]1 F
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- n K& Q2 o, @' t. a - the perquisites right, just open your server.ini file, and add this section at! {9 z# U6 W1 z( c" F
- the end:: V j# }) ?5 M2 {7 ]# ^/ @3 M9 ~* p
- ---cut here---5 O, q) B9 Q9 c O7 A6 @5 }6 z
- [DBEXPRESS]9 v- K' Q6 {! m$ V
- sqldir=mysql_sql) c! J, ~3 f, p5 ]. B
- Drivername=mysql
# G0 B8 ~0 O6 z) G2 ~ - Database=Your_Database_Name_Here& N; p8 m! l/ G2 g1 n L/ A: ^
- Hostname=The_PC_the_MySQL-Server_is_on* o2 P- t4 e# T/ x5 ]# [# _
- User_name=User_name_on_the_MySQL-Server
; Y$ T2 m7 O% M! Q+ \4 i5 D' X - Password=Password_to_go_with_above_user_name0 i7 m5 T- t2 \( `# b! K; }. k
- GetDriverFunc=getSQLDriverMYSQL6 `4 x, r" L6 F! g$ s& y
- VendorLib=path_pointing_at_your_mysql_vendor_lib8 R9 I* {* Z9 M# Q4 p
- LibraryName=path_to_libsqlmy_libary0 r) x- S6 |8 O' N0 l0 H L2 J
- Active=1
$ x+ ~( v! x7 H3 f, C6 B - ---cut here---
% o5 v" O# M3 e6 ?- Z - In my environment (a linux box with a MySQL server running locally) I have:( B, u: x! f$ ~
- ---example---
" k6 ]7 D6 O% q1 f5 @! q) A8 w - [DBEXPRESS]' V; ^+ W9 F& r" `3 q# A6 p
- sqldir=mysql_sql
7 R8 A5 u9 ~! @. ^( w- d# T - Drivername=mysql! w( J# W* `6 y2 t6 s4 s
- Database=test, I* ?2 r6 K4 g6 k$ |
- Hostname=localhost
% t+ i% o" b! M* D) j O) j2 n - User_name=testuser
! D, [4 ^/ `- p1 M - Password=my_password" |2 {* O! S/ g2 L
- GetDriverFunc=getSQLDriverMYSQL
9 f; d- |# J+ m! T! M5 X. Z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ G+ Y0 h7 u5 f4 E2 G* H0 ?! M - LibraryName=./libsqlmy.so0 v: {+ {' G1 G; [" r; U [
- Active=1
& i+ q3 Y7 {/ O - ---example---
# n5 v2 J6 h9 }: p8 j
% k9 z9 [% r5 Q- On a windows box, also running the MySQL server locally, it would be:
; Y" b% V1 n$ R7 k/ l - ---example---
4 ?, k$ p8 H8 h9 h4 P - [DBEXPRESS]
" f4 n* j7 U- ?: V: Q - sqldir=mysql_sql5 ~! u& H) p9 [5 U
- Drivername=mysql
- N: {) y# o3 Q" {3 n4 D* l - Database=test
6 h3 O& H4 B5 Q# a - Hostname=127.0.0.1& L; L2 H) O' G' L5 j G
- User_name=testuser
2 @8 C# P4 _' y, u8 C& G x- u - Password=my_password) i) |6 p, c8 R- v: p
- GetDriverFunc=getSQLDriverMYSQL
9 {3 F9 H" P" Y: E" d, v# s" S% S - VendorLib=libmysql.dll
. k* K1 h ^1 ^% ^ - LibraryName=dbexpmysql.dll5 F" w- y0 u' A: a$ [$ o
- Active=1* L( T+ S+ j9 i( Y
- ---example----
+ A8 b0 y' x: u# @& j# M - - written 02.03.04 by pwk.linuxfan @) y- i4 ^5 q, l; K/ e2 |5 W7 _
- 1 o' E+ Q' x7 l$ }! O3 M
复制代码 |
|