|
|
麻烦翻译一下,下面这段文章:xhan - Q5 ^+ O1 T% L9 Y2 |8 o9 |
; {* K# U7 G/ a: A2 A, a* R4 p- # @; h7 g9 L+ j, A
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######! q2 ^* j+ }+ ]% L0 q
- ( v& ~$ n* y p" H: }, s3 J9 {. A
- ### What we need ###
" r' X' i: _) n K# v+ h% w) N - Naturally, we will need a MySQL server to store the data for us, this document ( q5 F% x$ k. T% Y* I
- will not explain how this can be done - there are documents out there for the . o/ ?% V1 N2 T, E8 b
- interested. The requirements include a (empty) database for TeamSpeak to use7 a9 k7 j0 r: Z/ }0 z
- and a user account (username + password) that has the permissions to do stuff
4 i8 B) t: ]/ ` - with the database. Additionally, you will need a vendor library installed on the9 F- M/ b {( K7 K! e# K
- local machine, this came with my MySQL install.
4 V: G1 v' u: \ - These instructions will not tell you how you might transfer your data from the/ u; W* [$ ^% G8 R; Y$ ]1 X( x
- SQLite database to the MySQL database, we start with a clean and empty MySQL B; n9 {; L6 m9 [
- database.
4 H* y4 O- p3 R4 \ {; N* G# s - Some users have reported ways to import a SQLite database into MySQL, but at
+ w' {; h; U8 M L - the time of writing, there are still too many issues - check the current status
% `3 y( z- R U. y: D - in the TeamSpeak forums if you are interested.
7 }6 N/ S$ z6 y& H7 E - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) \) q& X0 n: I+ {
- Borland was used. This driver can only interface with the client library that
]" M+ F2 Q. F S& ~# d6 \4 |/ s+ W" o - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
' ~# @- M8 _ X1 E - client library - basically all you have to do is to use a 3.x client library as 6 \2 `2 V% i% f9 s( y9 u" j
- "VendorLib" and a 4.x database to connect to.
+ b. ^1 c: m1 M) g% @ - If you need more info about dbExpress, you can contact Borland.
/ |0 ]7 K+ ~, q/ @/ p( V( ]6 m/ L
5 K; f% r3 H0 v$ i5 o- ### Doing the work ###
/ `. ^# p* F& }8 p+ a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. r6 Y" \* H9 \- F, s' q - the perquisites right, just open your server.ini file, and add this section at7 V* H+ w! C8 I+ N! A
- the end:
) \! W9 h( B' x - ---cut here---
! x" q2 E% s& ~$ ?1 [* V2 g - [DBEXPRESS]4 V" t' f6 k% F. C6 u, l% ^
- sqldir=mysql_sql
+ M# I) n9 O3 ]( G" @4 d - Drivername=mysql
% W6 \5 \3 z! H- q# C9 S - Database=Your_Database_Name_Here- Q9 Q5 e6 g0 z/ O% R
- Hostname=The_PC_the_MySQL-Server_is_on
* ^+ c2 \/ x8 E/ N0 e& Z - User_name=User_name_on_the_MySQL-Server
$ V8 Y! i5 C& } - Password=Password_to_go_with_above_user_name
7 B! ]: K2 K( V' M5 Z - GetDriverFunc=getSQLDriverMYSQL5 M2 |- `# r V, x( x& D5 Y; W
- VendorLib=path_pointing_at_your_mysql_vendor_lib
$ @% T6 L" C) C5 Q5 s/ [6 D4 ~ - LibraryName=path_to_libsqlmy_libary: C3 c1 h( m4 Z. t
- Active=1. ^& ?/ Y, s( V3 f4 \9 Z: K& {
- ---cut here---
6 A0 e3 q( Z9 ]: E0 y/ } - In my environment (a linux box with a MySQL server running locally) I have:5 D) T, t* K9 ~; z4 s
- ---example---
$ [, Z9 c2 w4 ^: y% a0 h- i - [DBEXPRESS]5 Z! \9 [- ^2 {
- sqldir=mysql_sql* N* t: ~) C) T2 v
- Drivername=mysql
4 s i' l, ]4 _6 `- Q - Database=test
+ Q, P- F# @7 m3 T. P8 [ - Hostname=localhost
8 ]9 L. _ j$ ] - User_name=testuser: H: c) v7 \3 K7 F8 p; `/ ?- l
- Password=my_password3 n9 R) J! u# W! x
- GetDriverFunc=getSQLDriverMYSQL
/ @+ a4 e7 {2 t/ M9 \7 K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& U( G3 ]( S# t# {5 H# K
- LibraryName=./libsqlmy.so
7 }( W' s' w8 f5 R5 M4 N* A - Active=1
# k, ^2 L1 S/ l' x' C/ { - ---example---
! { U# {! f- F9 x! N# |3 y
$ j: [; ^+ H' d9 N9 Z* G2 k- On a windows box, also running the MySQL server locally, it would be:% v/ |$ g4 [7 z( m( p+ \9 I
- ---example---
" j* A% r0 B- S - [DBEXPRESS]5 u7 l* s6 @$ f% @
- sqldir=mysql_sql& x/ x' x5 R/ i/ p
- Drivername=mysql
+ q+ x4 d' {6 p) O8 e% s6 T - Database=test
/ J* t( h- @1 B* B; L* f - Hostname=127.0.0.1
/ X0 I9 [: e4 X/ m; O - User_name=testuser) H8 r& b" R- P/ g
- Password=my_password- j F8 j5 x0 w- C8 r J
- GetDriverFunc=getSQLDriverMYSQL1 G* C$ c5 [& P# L0 T% \
- VendorLib=libmysql.dll/ d' ?" |6 z; {$ ^1 X
- LibraryName=dbexpmysql.dll
1 {8 |' D2 g. `' D. K# h - Active=1
8 d9 a/ E5 ~0 X; k, \" s - ---example----( d7 H4 c3 d7 D8 X( \7 @( q
- - written 02.03.04 by pwk.linuxfan
* I/ g6 @5 V1 P w - 5 j# @! |5 U5 d
复制代码 |
|