|
|
麻烦翻译一下,下面这段文章:xhan 4 i, ^( m7 B8 a0 J! u
% b$ J4 ]7 h7 G; g3 l- `$ P3 `, {
- ~; Y+ E9 ]8 b* v5 @; b% |
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- `+ K5 D H$ P3 Z
- K' v! [ P: y; B1 g
- ### What we need ###
- z, v9 Y4 U( N2 T$ Z5 X - Naturally, we will need a MySQL server to store the data for us, this document
$ F7 F+ _ x6 Y [" [( \ - will not explain how this can be done - there are documents out there for the
+ W" K/ x4 F0 @ - interested. The requirements include a (empty) database for TeamSpeak to use$ n$ H, P% u. \ A. q
- and a user account (username + password) that has the permissions to do stuff% l/ o0 p+ i6 m$ U4 e8 {
- with the database. Additionally, you will need a vendor library installed on the. V7 s: T5 j5 Z0 Q, `
- local machine, this came with my MySQL install. e# x; Z3 y' T% _
- These instructions will not tell you how you might transfer your data from the
4 t7 x$ A2 C/ h3 Y5 n - SQLite database to the MySQL database, we start with a clean and empty MySQL
% @" O! h# m* n; G. g8 s - database.
% O) q4 b5 g- n/ L6 [ - Some users have reported ways to import a SQLite database into MySQL, but at
4 \( l6 ?4 G- c/ p* {( b1 p* A) p - the time of writing, there are still too many issues - check the current status
2 D5 e; Z/ \ s: G+ @3 p9 B - in the TeamSpeak forums if you are interested." F) ~0 ^7 F \! L
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) z, Y; {# ]5 j3 s. K N1 i
- Borland was used. This driver can only interface with the client library that
& j5 Q* c6 B0 y2 @6 \$ ~6 C) t8 K - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. y# ^1 i# v* n f E: Q/ F' Z - client library - basically all you have to do is to use a 3.x client library as
: d: m q/ q- N6 Q6 P, y - "VendorLib" and a 4.x database to connect to.8 `$ i& ]: ^# w7 V' {' A3 y
- If you need more info about dbExpress, you can contact Borland.# H" N! h3 W# V! n' i) v' N
- 3 L' @8 P- z' w4 K8 G
- ### Doing the work ###( f" m, F$ P2 T1 E+ a( x
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 s/ o Z: d% Q+ R: y - the perquisites right, just open your server.ini file, and add this section at
5 ` [) F$ C; H' ] - the end:
/ d- `; a6 u4 v3 P - ---cut here---
8 c1 C2 S( r( P' z - [DBEXPRESS]
5 Y2 l$ I! K+ {/ f - sqldir=mysql_sql) L7 ]; V7 o" R/ R! A* E6 E
- Drivername=mysql
, }# C3 x' @# |3 F - Database=Your_Database_Name_Here
, Z2 {3 U9 y: q3 H - Hostname=The_PC_the_MySQL-Server_is_on
' Y$ q$ p6 `. C m, d - User_name=User_name_on_the_MySQL-Server5 s% ]2 X" p% F1 i2 L
- Password=Password_to_go_with_above_user_name
$ ]) Z# e6 R a - GetDriverFunc=getSQLDriverMYSQL
: y; k0 ?! \/ Y" k- b - VendorLib=path_pointing_at_your_mysql_vendor_lib
( ]7 G7 F7 t7 N5 E+ X ? - LibraryName=path_to_libsqlmy_libary
7 {, A1 H! m( `7 O2 [) j7 m - Active=1- c3 A1 u) g5 q& y8 u$ y3 i& @
- ---cut here---
' g+ h [- I" ^' G4 k5 } - In my environment (a linux box with a MySQL server running locally) I have:. o# S1 h* O0 h) j1 \2 M8 i
- ---example---
0 C3 l* K* i0 d! _% q0 b9 f! v+ W( E - [DBEXPRESS]
+ w. G) j M1 f4 b; `9 f n - sqldir=mysql_sql
- n; i1 K2 G# ~: v( n. Z - Drivername=mysql, _+ o& z6 Y6 i; u/ a
- Database=test) C3 P1 u; B' O% _+ j
- Hostname=localhost
. u6 s& I5 t G0 B: s - User_name=testuser) [/ c- ?2 C9 P7 C+ Q( L( s
- Password=my_password
6 Y. e' c0 [- ]/ p8 r - GetDriverFunc=getSQLDriverMYSQL! Z5 A- m. D) o% j
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
/ d1 R, P( m# y, W - LibraryName=./libsqlmy.so0 k) X1 g1 X: M
- Active=19 r8 O, E, q5 Z
- ---example---0 T, Q* T1 \3 |
/ b8 @4 ?( P6 M( O! G/ ^- On a windows box, also running the MySQL server locally, it would be:
" U5 x: {+ X! q+ ?3 w3 h+ t$ t - ---example---
?$ e( P/ }$ w% T - [DBEXPRESS]6 I/ j- w3 x; o! D
- sqldir=mysql_sql
: n& Y. _% ^: j6 q - Drivername=mysql
" G. Y F7 w2 [3 T - Database=test
/ ^: L1 T4 N2 k& {0 y - Hostname=127.0.0.19 H r2 G" h4 h# n+ U2 P1 e, m8 A
- User_name=testuser: `3 Q n0 ]4 [
- Password=my_password
- ]( g' Z' G3 w$ E. J - GetDriverFunc=getSQLDriverMYSQL
2 {7 k' e0 C/ M: N' I9 n# J - VendorLib=libmysql.dll
! X" s6 \ S/ M - LibraryName=dbexpmysql.dll8 ^8 _( @4 Q$ M! h: R
- Active=1
( g; _4 Y5 A8 k4 M5 s - ---example----/ k& ~0 m; V0 b# W2 h# _
- - written 02.03.04 by pwk.linuxfan. }7 R7 a# v2 q% _2 [9 o
8 A& j3 @1 I' U* o2 y1 C
复制代码 |
|