|
|
麻烦翻译一下,下面这段文章:xhan 9 L" Z N% r4 K0 x8 w* X s; F
7 T: h) U p! e-
! P5 A! I0 @: J7 `! a/ o$ D - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: M" S# `4 G* A6 b
- : V( M+ U; \" M7 F$ `/ ~
- ### What we need ###
7 U! g3 S8 R/ m# M7 w - Naturally, we will need a MySQL server to store the data for us, this document
+ [$ W" R% R+ Z0 B - will not explain how this can be done - there are documents out there for the ( H' s9 l$ w4 V, Q# d! x5 z( a6 T7 E
- interested. The requirements include a (empty) database for TeamSpeak to use+ s1 h3 D! I" l
- and a user account (username + password) that has the permissions to do stuff
$ n1 @) z8 J: O( L2 Z+ h: u - with the database. Additionally, you will need a vendor library installed on the" v: i7 m- [, g# v
- local machine, this came with my MySQL install.% K8 t$ u& p; w" u) h
- These instructions will not tell you how you might transfer your data from the+ f! G% i) c" }: D3 D% q M/ q
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 q3 g& r% a8 d7 I8 y" E
- database.
( y2 _& a7 k7 n% T" V$ E3 j - Some users have reported ways to import a SQLite database into MySQL, but at
8 L v1 N' `4 C$ h o u - the time of writing, there are still too many issues - check the current status
- U& E/ @, w" d: j4 ?; q - in the TeamSpeak forums if you are interested.
2 x4 M: R* @# t+ M8 c9 i - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 i& d1 ^) R! _ - Borland was used. This driver can only interface with the client library that
2 @: E4 h" k6 e5 a7 ^: H# r - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% c% j7 Q8 r' { - client library - basically all you have to do is to use a 3.x client library as / s1 N9 w8 O( g" Q" n6 b
- "VendorLib" and a 4.x database to connect to.6 @' r7 H& J0 I7 M- h
- If you need more info about dbExpress, you can contact Borland.
8 \% e4 T# G- x7 P( N. d& Y
) e" N, Q, N& y* {9 }2 V- ^- ### Doing the work ###3 g6 d8 n; e1 h0 J- Q
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
/ r6 p! J9 I) {: k5 ?) R - the perquisites right, just open your server.ini file, and add this section at$ e5 I" Y9 m: z4 f1 L
- the end:4 y( t& `1 [% R4 n
- ---cut here---# M. E) |! F& i0 G- b" Z! V: [2 s
- [DBEXPRESS]. s3 V& P! T1 x5 P7 k' x
- sqldir=mysql_sql
{* [0 Q8 ?6 d" _ - Drivername=mysql% ?0 l/ g$ D; d6 {* F
- Database=Your_Database_Name_Here
+ N' x% m* r( v - Hostname=The_PC_the_MySQL-Server_is_on+ Z: s( n9 ]! h3 Y3 H
- User_name=User_name_on_the_MySQL-Server! ~; S% S* B! J7 M% U
- Password=Password_to_go_with_above_user_name7 O' Y" J, J& ^+ s- e
- GetDriverFunc=getSQLDriverMYSQL
! S9 U' d, X2 Z m* c - VendorLib=path_pointing_at_your_mysql_vendor_lib! I+ |4 Z7 \- @0 P6 L
- LibraryName=path_to_libsqlmy_libary
" b8 z" Q% v2 L! ] k, s8 o( h - Active=12 m: z& v$ ?" s& _* Z
- ---cut here---8 w7 q( F4 O( W: {* D
- In my environment (a linux box with a MySQL server running locally) I have:6 J- R4 k* M" k
- ---example---' |) X5 v1 Y* T6 E) v
- [DBEXPRESS]) n5 Y8 _" v3 s5 K6 ?; o
- sqldir=mysql_sql
$ H6 D9 a4 N! _$ Y - Drivername=mysql
2 E6 K1 d& F+ a& [) A4 z3 t - Database=test K) O& }0 i& X0 y* W& f6 s9 {" G* J3 W
- Hostname=localhost
: Z5 D5 Z& J8 d9 q/ Y( @- q - User_name=testuser
6 P4 U! e! N9 b: o! Y3 p - Password=my_password @/ U# X5 ]( \9 o9 u+ n
- GetDriverFunc=getSQLDriverMYSQL4 S7 R& k7 [5 y. _! q
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 B5 W1 k8 e0 t - LibraryName=./libsqlmy.so
5 k/ n+ B; k& ?5 u; ?8 }7 i - Active=1
' L7 O' ~0 b+ H7 G8 w - ---example---
+ k7 p5 b5 E3 i2 N8 s
( p# [( [( u: P$ H3 U& [. q9 ~& d- On a windows box, also running the MySQL server locally, it would be:0 Y' \5 C8 d0 v! {
- ---example---
; {, p8 t- x* e, Z; w+ U - [DBEXPRESS]
2 @* s% [9 _ H" H - sqldir=mysql_sql) i0 \! V9 I# t. x) m
- Drivername=mysql
9 h( [8 U t% w! t3 @7 } - Database=test
$ N( [. y% o' S6 Q Y" E0 | - Hostname=127.0.0.1
0 U/ W7 t" x$ k, Z - User_name=testuser
4 u* ?6 t6 [$ \9 C1 j2 o* z - Password=my_password
+ I8 [( e( w" l: x# G- C* t5 s - GetDriverFunc=getSQLDriverMYSQL
! N, U7 O+ u. C* k - VendorLib=libmysql.dll a' G7 P7 s* b1 \6 u+ [2 {
- LibraryName=dbexpmysql.dll
2 T b( B( _+ ^$ L8 H; _6 Q - Active=1
" j) A% C" r. X - ---example----" b6 k" ?& t. v0 H# w
- - written 02.03.04 by pwk.linuxfan
; n8 Y( B2 Q& e# U; Z: j) @ - 9 B2 ]2 Y- N, F
复制代码 |
|