|
|
麻烦翻译一下,下面这段文章:xhan
* L6 B" [( D [& |+ k3 u8 N1 [# |( z4 Q' N. P
- / I$ s; [% s( }
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
7 Z! N& t- Q" W4 h0 o - 1 H B: E9 l. C+ S. I! y
- ### What we need ###4 F& m8 p" F. k: p, u; `
- Naturally, we will need a MySQL server to store the data for us, this document 7 ^# [2 k+ S! Y8 u; w' ~
- will not explain how this can be done - there are documents out there for the
! C5 b, \# d" N5 M3 j& X - interested. The requirements include a (empty) database for TeamSpeak to use0 H; C/ E! ^! i2 X
- and a user account (username + password) that has the permissions to do stuff3 m) e* T, @" E s
- with the database. Additionally, you will need a vendor library installed on the
o: `$ [3 Q4 y) {8 J# I( M% F - local machine, this came with my MySQL install.
% h5 ], N" S- K( e4 D% U! f - These instructions will not tell you how you might transfer your data from the* j4 m$ B- d* }/ A* K: L
- SQLite database to the MySQL database, we start with a clean and empty MySQL
/ W. K9 v5 F$ Y5 y1 b - database.# H) P7 |7 U% O' W7 ~# R
- Some users have reported ways to import a SQLite database into MySQL, but at
6 n. H. _2 D$ p) }4 ]1 Z - the time of writing, there are still too many issues - check the current status
+ @( \( g; M- q& ?( V7 r* Q - in the TeamSpeak forums if you are interested.8 ?2 `7 b4 p8 x1 v- G
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 l8 r" C$ B9 o$ V+ F
- Borland was used. This driver can only interface with the client library that A/ W3 ~. i: F1 j
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this% _! C( b6 L0 w; [
- client library - basically all you have to do is to use a 3.x client library as + F' X8 H: F0 R$ r
- "VendorLib" and a 4.x database to connect to.6 }: @) p5 [5 l1 ^, \
- If you need more info about dbExpress, you can contact Borland.2 q; m% E" e# T
3 P% o3 ]1 W0 S" Q- ### Doing the work ###
. l" h( m8 h u9 ^$ Z$ ^2 O9 `! f - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
6 v6 {: @6 f F7 j2 } - the perquisites right, just open your server.ini file, and add this section at# I: B' A% l0 E
- the end:# F, G; p1 }" q0 X. Q- v# z+ \
- ---cut here---
9 _6 @, x+ f# ~7 m: s M0 t$ ~& G% H - [DBEXPRESS]
" E( q4 L4 ?6 _! A' k% R2 X - sqldir=mysql_sql
/ a5 y# I/ b( x1 w, }/ M ^ - Drivername=mysql( Z$ w' x6 D, {3 h% p' g* \
- Database=Your_Database_Name_Here( D/ V! Y! s+ v1 y
- Hostname=The_PC_the_MySQL-Server_is_on
% [2 V- n; }# O% T1 S, J& X - User_name=User_name_on_the_MySQL-Server
h. h2 q/ x2 U( v3 ~) G" P - Password=Password_to_go_with_above_user_name1 c2 q9 F+ s& n, J/ \( Y
- GetDriverFunc=getSQLDriverMYSQL2 z6 s& V6 e0 \! I; M
- VendorLib=path_pointing_at_your_mysql_vendor_lib1 w7 M, r. F: j6 v/ C
- LibraryName=path_to_libsqlmy_libary! x( [! J, N& c1 l/ x9 I
- Active=1, x, F' `0 E$ S6 L0 \- h
- ---cut here---
% N! \ G( p3 V% d! O& |7 ` - In my environment (a linux box with a MySQL server running locally) I have:
# }" g1 N+ z, U# t5 l# N) v/ X. m - ---example---
. o; a' z5 S, L1 O" L7 L - [DBEXPRESS]
6 M( s* p* v$ B, |; _- m- [0 x" Z - sqldir=mysql_sql
: v- t% z# g7 C. c - Drivername=mysql* Y, _/ W0 q- F
- Database=test
$ G- O* w! w: l - Hostname=localhost% c8 }: H/ z# ~$ B7 K8 ?9 Z
- User_name=testuser6 C- {9 D ?2 @5 M1 [3 H6 n
- Password=my_password. M% Y* Y: y0 X1 N- \% R0 {7 R
- GetDriverFunc=getSQLDriverMYSQL
& ?5 K g. o' a+ @/ \ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 Z- @5 n. o( r. d. }# z
- LibraryName=./libsqlmy.so
8 L. ]5 z) u6 s - Active=1/ V; |. e3 h0 P: K
- ---example---. w8 R V6 ^; N
5 n: y! Y2 K. Q- o+ y2 O- On a windows box, also running the MySQL server locally, it would be:
0 w- P9 }( p. s& ^: d% R - ---example---) u3 S/ a. v: \7 u
- [DBEXPRESS]7 b* j/ l" ]0 u2 x5 Z( E" \
- sqldir=mysql_sql
* g8 Z4 |3 V3 d: G: F - Drivername=mysql
- |6 s, v' R9 I - Database=test
; [6 ~* e6 q8 h7 ^% h: {! T4 }! Y - Hostname=127.0.0.1
. Z, d+ n8 ?& C7 s F- z5 R6 y - User_name=testuser
8 T" ~8 S+ U4 a; h, D0 g7 j, ~- _0 h - Password=my_password' \' \& w$ N/ h) }0 H
- GetDriverFunc=getSQLDriverMYSQL7 X- k- Z, G. \* | O. {
- VendorLib=libmysql.dll' ?# A, U$ _0 E1 N3 N
- LibraryName=dbexpmysql.dll
, A# v: H, d* |% ~( _6 V& M: e! @ - Active=1: { \0 n) m" d
- ---example----$ D( r/ d* o# E* {
- - written 02.03.04 by pwk.linuxfan
$ D+ x# J! e: D - % O1 w+ A' m! [5 n. Y; L: F
复制代码 |
|