|
|
麻烦翻译一下,下面这段文章:xhan + d! W' Y# i0 }! ~& W5 y0 G
3 |# Q( T8 v+ Q' {! [# @8 V) n2 {7 h
- 1 j8 E/ ], y; T! o1 W8 b W
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 x8 u/ k: i& Q6 l( H! p - ( o0 I' E$ E" A# F" g2 `* S/ J
- ### What we need ###
9 i, C) d6 y7 M# S( }# h1 u; I - Naturally, we will need a MySQL server to store the data for us, this document
* }* }% z5 U9 t$ b, o - will not explain how this can be done - there are documents out there for the
5 m) [4 O. S! X- G - interested. The requirements include a (empty) database for TeamSpeak to use5 U, L& `" p6 h
- and a user account (username + password) that has the permissions to do stuff1 ?/ L2 Y4 s+ ~. \: K' t
- with the database. Additionally, you will need a vendor library installed on the: s2 T% p! s$ b ]% i
- local machine, this came with my MySQL install.
6 w1 N! r7 _/ V) H4 c - These instructions will not tell you how you might transfer your data from the
) o \& j: @4 R+ c+ v5 L - SQLite database to the MySQL database, we start with a clean and empty MySQL8 A0 F% N/ v' ` O
- database.; s$ V: e3 H7 q& n" b4 _
- Some users have reported ways to import a SQLite database into MySQL, but at
+ |. ] c0 T& n5 _4 d) k% g# `1 G3 ]' s - the time of writing, there are still too many issues - check the current status- p3 o8 N* G2 Y, c
- in the TeamSpeak forums if you are interested.
9 c( f* [. i% Y5 ] - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from- Q& u/ i8 M9 R, A6 `
- Borland was used. This driver can only interface with the client library that
: E9 B6 C. E" Y x$ ] - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this( K, ^0 ^" ~# c* Y$ V
- client library - basically all you have to do is to use a 3.x client library as
7 o, a# ?, A1 G# X7 n: X/ j/ [ - "VendorLib" and a 4.x database to connect to.
0 q2 q5 D/ w( N" ` - If you need more info about dbExpress, you can contact Borland.
5 ~, v1 h3 Z! k; _1 B' a
( D" l. n* c% g% d5 {, H- ### Doing the work ###) A, t( z4 E# O6 j! a& c
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: D6 A6 o% p: O- m4 A - the perquisites right, just open your server.ini file, and add this section at: J! g0 {; B3 ~. C
- the end:
3 t' t* J6 s. _5 O0 l& a - ---cut here---) R4 @* T& c; `- e5 s
- [DBEXPRESS]& A6 w) }7 e4 P) O4 b* V/ \
- sqldir=mysql_sql
- W% C. q$ t- R, t - Drivername=mysql
4 p5 D6 {( r# ^7 o4 ^; k - Database=Your_Database_Name_Here2 Z, T" g1 h/ X5 j) `' r' [* U
- Hostname=The_PC_the_MySQL-Server_is_on
, B7 `, [7 Z* g - User_name=User_name_on_the_MySQL-Server8 V& A2 e: ]3 g7 v& W2 J0 g- P
- Password=Password_to_go_with_above_user_name
# h( x/ g0 q# ~0 y3 ~/ Q - GetDriverFunc=getSQLDriverMYSQL
2 O' W1 ^, x- I F8 m% _2 Y, v( ` - VendorLib=path_pointing_at_your_mysql_vendor_lib4 p/ a. [9 Q" T
- LibraryName=path_to_libsqlmy_libary
- [% u' D+ O9 R2 ]4 ` - Active=11 K3 I4 c- Z3 H" L+ w( b# j
- ---cut here---+ P; B3 n2 z' a9 x @! _
- In my environment (a linux box with a MySQL server running locally) I have:$ f. N, G/ P$ N$ j3 P% N3 P
- ---example---
7 R) }( s5 D' q. }( q4 F - [DBEXPRESS]* O) a' u3 m% H1 o) t) w
- sqldir=mysql_sql
2 D* k3 m6 \, ?! { - Drivername=mysql7 J" R: L1 p0 E# E
- Database=test
) R* ?) N2 i8 ?% y& w6 L - Hostname=localhost
" `% x: X* h1 l/ T, P ^4 F3 Y9 y - User_name=testuser
2 x8 c0 v. g6 b+ |, z - Password=my_password
$ g- i6 ?3 {3 T6 W - GetDriverFunc=getSQLDriverMYSQL! h$ ~; N: c/ k9 |' u0 X" A
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
& w8 p3 g5 c- @3 ^5 J - LibraryName=./libsqlmy.so
1 p4 ]* o3 ]. p6 B: D% | - Active=12 d- p7 Z# e# G- g% ~
- ---example---0 u2 U7 K+ Y5 [9 ^4 K8 \& |% v
- ( i6 _ {: P: A+ h3 W
- On a windows box, also running the MySQL server locally, it would be:+ `2 R8 L3 |* h% O, W- o
- ---example---
2 |, l" ~9 K( d+ O - [DBEXPRESS]$ Q# g! n( W* ]) e
- sqldir=mysql_sql! E4 D5 A& |0 F
- Drivername=mysql' h7 E0 z& c8 R" z7 u
- Database=test" \5 i e5 d4 V1 A" }
- Hostname=127.0.0.1
7 L1 q/ T; n, n d% a& I - User_name=testuser
# p( e }5 `1 g7 g1 v) K - Password=my_password1 Q' C6 F; Z' a1 R1 [8 [1 e
- GetDriverFunc=getSQLDriverMYSQL
2 M9 T: T: V& ], E/ {. G1 y - VendorLib=libmysql.dll; \2 F7 T" I: V% R* t0 V
- LibraryName=dbexpmysql.dll9 j* s# Q. J5 `7 Q: l2 f+ N5 f, J e
- Active=1
0 \ H |) {9 A9 @4 Q4 T/ [ - ---example----5 }; M7 ?! Y* o% v9 |7 }8 u V
- - written 02.03.04 by pwk.linuxfan
4 {4 X8 R3 F2 U- C, R
+ i/ E: |; Y/ C) U. |* ^; N
复制代码 |
|