|
|
麻烦翻译一下,下面这段文章:xhan
5 Z: r4 h5 l- E! E( q4 }
E8 U7 m% |/ q* I, L: D- ( Q0 ]0 ~; d; K' y) u5 E% s( P
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######, J. s6 y! J5 q$ t& W! ?
- ?3 d$ O0 ^$ A( \- ### What we need ###
" }3 O2 e: X5 b1 z+ { - Naturally, we will need a MySQL server to store the data for us, this document
/ q1 l) h2 h c' i - will not explain how this can be done - there are documents out there for the
% X: Y' Q6 q- k6 T8 u L - interested. The requirements include a (empty) database for TeamSpeak to use6 } H& q8 }6 y& z+ V" x
- and a user account (username + password) that has the permissions to do stuff
8 g# O* ]- p* a! _ - with the database. Additionally, you will need a vendor library installed on the1 f( u- i) {9 `- I/ w6 G* E& f* J3 |
- local machine, this came with my MySQL install.
: p5 \% T% x/ m8 a+ n9 i* @ - These instructions will not tell you how you might transfer your data from the
. L! s7 k7 P$ g: F( D, P: @ - SQLite database to the MySQL database, we start with a clean and empty MySQL
8 }$ Y' ^5 X$ Z& Z# n- [ - database.1 n. m& h7 d, W
- Some users have reported ways to import a SQLite database into MySQL, but at
3 N4 c4 E2 q1 _& G5 x" A% u0 d - the time of writing, there are still too many issues - check the current status
" ?9 T& O% r7 t' z5 n. _% T - in the TeamSpeak forums if you are interested.
; l! F/ g! d M' Z - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" S, F8 h7 A3 ], i - Borland was used. This driver can only interface with the client library that 2 Y' R5 B R4 |, i& k5 k5 }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 O* L9 |) i' y' @
- client library - basically all you have to do is to use a 3.x client library as
4 f% G% k: E7 ]) ~ - "VendorLib" and a 4.x database to connect to.5 G& [6 h; ^& p; m
- If you need more info about dbExpress, you can contact Borland.
# R" a3 c; u- z% `# I3 k3 _ - % G/ F# Q; S% b8 Q" C1 m0 |5 F, _
- ### Doing the work ###
" I% Y$ X# N2 [/ D6 Z* e - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 D2 [$ b1 a- M1 b3 ]& o
- the perquisites right, just open your server.ini file, and add this section at
, ? N+ T. I9 f1 D/ `: b - the end:0 y* |, x- f9 |# S8 A
- ---cut here---
, X' Q0 Y; z, W4 H. \( ^# ] - [DBEXPRESS]4 q% z1 e8 \) w. c. z
- sqldir=mysql_sql1 f, }0 v0 V9 o7 }6 t! g
- Drivername=mysql0 F, Q i) ], D9 p
- Database=Your_Database_Name_Here( g5 \& M9 k9 \, u2 f
- Hostname=The_PC_the_MySQL-Server_is_on
& M5 Z5 B4 n+ |- o* A" X. |- z( k - User_name=User_name_on_the_MySQL-Server( p# F3 b' T+ t# P9 U
- Password=Password_to_go_with_above_user_name7 o; ?, L! h# o; M2 e& d
- GetDriverFunc=getSQLDriverMYSQL- X+ J6 H! J. z0 P$ c
- VendorLib=path_pointing_at_your_mysql_vendor_lib7 e6 G p) z, n. B# `
- LibraryName=path_to_libsqlmy_libary
4 k5 I3 D2 B" H& J - Active=1" L* ]& i2 e" k% @
- ---cut here---
+ p3 u1 U Z Z3 O( e - In my environment (a linux box with a MySQL server running locally) I have:( b: t" s3 E& }. z. ?8 A
- ---example---
U8 r- I+ l* W0 B - [DBEXPRESS]6 l8 F$ s, N5 I) A
- sqldir=mysql_sql8 m% J* G6 c2 l% i! d
- Drivername=mysql
: P8 i; T4 z1 `4 _/ V - Database=test- e: \- A6 I& i! c2 b7 \5 b
- Hostname=localhost& q/ s3 g# V+ _
- User_name=testuser
5 J+ J1 q8 H! e" c - Password=my_password
6 J5 _3 Q3 n+ r Q2 ~7 E - GetDriverFunc=getSQLDriverMYSQL
4 `4 Q/ v( Q# i. W- |% }' @ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( m2 ~! u! ]8 I" ?; Z& B - LibraryName=./libsqlmy.so! t; H' @- p9 J" M3 O# S
- Active=18 K) q0 f/ u+ i' s0 H7 a) ~3 K
- ---example---
4 M: Y. {& F' ~4 l! Y
: C p9 i2 n# C; J$ W4 T; i- On a windows box, also running the MySQL server locally, it would be:
+ l8 @* x+ `% X. T+ j - ---example---
+ B: p) c$ x" X/ e8 F - [DBEXPRESS]
0 o; [" }2 l# [# I - sqldir=mysql_sql; ~+ C! \* f" S
- Drivername=mysql
3 r4 T. I3 N9 H( E) o - Database=test0 Y& g/ |% E4 c) c
- Hostname=127.0.0.1
" N$ L$ Z! i# g0 \% } - User_name=testuser
. i9 S8 b3 o8 l( d1 D. H - Password=my_password% m5 L7 [2 W+ A: s% w
- GetDriverFunc=getSQLDriverMYSQL2 {9 B5 i& I: O8 c/ E5 j. ]; g
- VendorLib=libmysql.dll
; O$ O" e1 I9 A- {/ |' T# Q J/ h - LibraryName=dbexpmysql.dll
5 g! ?7 l# y# N- Z6 N1 p- [! ` - Active=19 e6 S G: L' n; A- a1 w- e+ r
- ---example----
3 _% t# I/ u" } - - written 02.03.04 by pwk.linuxfan
& K9 A$ {0 B/ P0 @0 @
7 L u d/ k# U+ h+ T
复制代码 |
|