|
|
麻烦翻译一下,下面这段文章:xhan 9 R" D6 o" n" z7 w3 @+ v
1 f/ Q8 P9 W, A# t+ d
-
" Z \; m! n3 s# C7 l! f% K - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 J) \# P( g/ y4 J1 M7 @/ I
- 1 N, W0 s% O- U
- ### What we need ###
3 j% ^+ \4 n# f0 j! l7 b - Naturally, we will need a MySQL server to store the data for us, this document
1 W! h7 f/ `' \) u. _; m: ~ - will not explain how this can be done - there are documents out there for the 6 @8 s8 z6 @: j, p7 z3 G
- interested. The requirements include a (empty) database for TeamSpeak to use" Z* X, e+ D! z# v
- and a user account (username + password) that has the permissions to do stuff
y: L) ~8 Q2 a3 \0 g; k* h - with the database. Additionally, you will need a vendor library installed on the
4 k1 N% ~9 G( b- B1 c5 K8 @) x - local machine, this came with my MySQL install.
& {0 L( I" Z* t8 u0 f0 j - These instructions will not tell you how you might transfer your data from the
1 n2 J2 g; ~7 A1 B/ r4 { - SQLite database to the MySQL database, we start with a clean and empty MySQL
$ B0 [4 C3 m) J) M) \ - database.
) K3 H, u: M0 p2 W - Some users have reported ways to import a SQLite database into MySQL, but at0 {5 E7 i E- ?' b
- the time of writing, there are still too many issues - check the current status
& e6 z' a7 V6 b% s+ M: }- z# u - in the TeamSpeak forums if you are interested.
& v9 Y( H' @# j5 u- X. h - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* J! B' z+ ?9 y U: U' } - Borland was used. This driver can only interface with the client library that / O7 d" Y( f F) Z) B; \
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! t) k! `6 j1 P( W
- client library - basically all you have to do is to use a 3.x client library as
P* P# X0 L0 B2 [2 t- R - "VendorLib" and a 4.x database to connect to.' f: S: t3 l: y
- If you need more info about dbExpress, you can contact Borland.
% p8 D5 w6 f: W) n$ Z8 b/ f) x - " f" O4 m+ ~8 x( X) l: X
- ### Doing the work ###
$ x/ y; J9 g# O- s - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' ?3 }2 [4 e" G - the perquisites right, just open your server.ini file, and add this section at0 o7 Z7 C A3 C
- the end:" z" e* o: N, o8 i$ U$ u f
- ---cut here---
$ Z+ h# [% u8 U" W$ |& d - [DBEXPRESS]+ k1 V. B4 q! @! }
- sqldir=mysql_sql
6 K5 s' B/ x' ]6 Y1 c$ I+ H - Drivername=mysql8 c- p+ x1 {, ^: }& a0 V9 a9 o
- Database=Your_Database_Name_Here
& O# |# v' ~/ f8 q9 k, A U/ Z - Hostname=The_PC_the_MySQL-Server_is_on5 D- N8 `7 S; `/ _
- User_name=User_name_on_the_MySQL-Server
* T5 j) v) a) }% f3 B - Password=Password_to_go_with_above_user_name0 p- U3 w8 F# A K4 _
- GetDriverFunc=getSQLDriverMYSQL0 h/ s+ F4 }3 a7 m# \2 Z8 g
- VendorLib=path_pointing_at_your_mysql_vendor_lib
* g( k: b R! l- m4 M - LibraryName=path_to_libsqlmy_libary
8 I' Z" @ z' Y- ~ - Active=1' r; |$ B4 b! {1 O3 @8 d
- ---cut here---' R3 \; E. P+ Q% n! \5 D6 R0 A
- In my environment (a linux box with a MySQL server running locally) I have:2 S8 p6 {! h1 m$ U) `
- ---example---' N' x |2 |3 q% q( Z3 `, O
- [DBEXPRESS]. @2 c2 E, g3 p6 W' U
- sqldir=mysql_sql% O! T* N; \. M x# L& [+ c! \
- Drivername=mysql
2 N X! t5 i, P$ n) L - Database=test8 V% P. c# I/ @$ B
- Hostname=localhost
5 X0 z5 b- }, O8 } - User_name=testuser, E3 B6 D7 ~1 x/ A# }* K" k
- Password=my_password
6 z' P' X/ U1 b( P - GetDriverFunc=getSQLDriverMYSQL9 H6 o* H& _5 N X& X5 T0 G9 m
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.08 m2 V- n0 z1 |: g
- LibraryName=./libsqlmy.so
2 Z" `, Q6 k0 U% { - Active=1# i) ?: _& M; G7 ?+ {3 m5 |
- ---example---
7 B! k7 w$ K# e; ]8 r- l
& _- g. K: G. j! w! N6 ]- On a windows box, also running the MySQL server locally, it would be:1 h. K$ t, B/ A x% m) H
- ---example---
4 ]* X' l& p) O3 N- K - [DBEXPRESS]- @6 d3 c3 Z' R4 U1 l4 Z/ V
- sqldir=mysql_sql
# m$ c' n* [- T S - Drivername=mysql
' s, g/ f9 C0 f2 y/ X0 M& m - Database=test0 ]: v& ?) [ E: K) f
- Hostname=127.0.0.19 {9 g3 A c* D+ v+ ^) i& t$ e
- User_name=testuser$ j5 S+ D) i) ~3 B" j, r" T/ N
- Password=my_password
3 x4 G% z! {; P, \7 r7 b3 |( B - GetDriverFunc=getSQLDriverMYSQL
! _$ C6 ~' `, k' L& o2 E3 x$ z; p - VendorLib=libmysql.dll- A- a/ T) _$ \7 G& U- C
- LibraryName=dbexpmysql.dll* J- J B$ t* M T- E
- Active=1: M6 p( I" P1 M- u) U
- ---example----3 }: a0 l# a5 U1 S3 u
- - written 02.03.04 by pwk.linuxfan
) y; _$ S' w8 g9 g9 l, \& X - 7 ]7 d4 U0 o l+ }; w7 S& `2 e9 d7 y
复制代码 |
|