|
|
麻烦翻译一下,下面这段文章:xhan
. F6 B7 J0 X. ^$ [7 O$ ^8 \3 ?
8 a% ~+ _) z2 |# M-
* l# f( Z( C8 w# j - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 M5 I+ c8 z" Z$ h8 {8 h
; V( Y7 ]$ u' j3 K9 k7 e. w8 v- ### What we need ###
7 U1 o: |! E2 t. { - Naturally, we will need a MySQL server to store the data for us, this document , w) s" u9 K) r: K n9 s& f
- will not explain how this can be done - there are documents out there for the
. ]& {# i( N. s* U' g/ Z% ] - interested. The requirements include a (empty) database for TeamSpeak to use
3 P- U& B& u0 \; C. x2 I- R - and a user account (username + password) that has the permissions to do stuff
3 P4 l1 v( X) c0 E% V2 R' {- o0 l - with the database. Additionally, you will need a vendor library installed on the
9 n% x! R" I ^ - local machine, this came with my MySQL install.6 w. F% i$ I6 t. U2 E
- These instructions will not tell you how you might transfer your data from the8 ]* L/ l& e; A
- SQLite database to the MySQL database, we start with a clean and empty MySQL
0 O* s/ K1 Y6 A$ Q5 e7 m - database.
: U ^# Y0 Z& a- W - Some users have reported ways to import a SQLite database into MySQL, but at
3 X" X* ^9 G+ C7 d* @ - the time of writing, there are still too many issues - check the current status+ c0 h7 c T# a% W5 I, Y( c
- in the TeamSpeak forums if you are interested.7 w" @1 [6 l$ m! N1 I) r: f
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# ?# k' \7 O- M7 T8 Q: w
- Borland was used. This driver can only interface with the client library that w$ A4 T3 v( p# w6 \- `
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
3 [5 k- A7 A6 o( j, J- g - client library - basically all you have to do is to use a 3.x client library as
; J, B# p. _6 i4 I3 w+ j" g9 \- W - "VendorLib" and a 4.x database to connect to.8 C0 V1 N x' ^
- If you need more info about dbExpress, you can contact Borland.. w) U% w$ ]* ]. q0 t; `
- ! T8 x6 B! U% g7 {: P k
- ### Doing the work ###
7 r0 p8 ~* ~8 o! D - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 M1 x, @/ l* B3 Z& K
- the perquisites right, just open your server.ini file, and add this section at& `' ^2 e+ C( q1 N5 n! q+ L
- the end:
0 ]9 Q7 N; y$ W: P4 m; c - ---cut here---
, A$ c0 [4 c: V2 Y) l6 r - [DBEXPRESS]9 B* j1 O! B6 f# p5 o
- sqldir=mysql_sql+ A' o8 ]" r. |
- Drivername=mysql7 K" q) `0 P: u L- s
- Database=Your_Database_Name_Here# V2 V) s* V; R+ z
- Hostname=The_PC_the_MySQL-Server_is_on
9 l0 w: s$ e0 H, |* ^ - User_name=User_name_on_the_MySQL-Server6 ^. k1 n, p1 l0 n9 M, o; C/ b& i
- Password=Password_to_go_with_above_user_name2 P- \8 n0 s: S# S# l. c- A
- GetDriverFunc=getSQLDriverMYSQL# y6 ]$ F! w" P( O6 E' K; T
- VendorLib=path_pointing_at_your_mysql_vendor_lib
6 y! x) S5 m% a8 x$ p8 |6 e - LibraryName=path_to_libsqlmy_libary5 K# v% |9 O( X
- Active=1
7 s- I |" d* \: w$ I: | - ---cut here---
0 h3 C$ @; z5 _0 p - In my environment (a linux box with a MySQL server running locally) I have:
/ u0 Y" v! s2 l# T. m( h - ---example---
. L( D; _$ T9 d- I( Y# k1 J - [DBEXPRESS]
, g; `* U) u( R( K; n% T - sqldir=mysql_sql
& l3 m! ]0 a" r; _$ E - Drivername=mysql2 }$ c; N! p; X( q/ B
- Database=test
/ ?) g- j+ G. h$ i* f - Hostname=localhost1 X3 f6 |5 D8 t. ]* x
- User_name=testuser0 D$ o) m5 ? l" S% Q" }2 c
- Password=my_password8 S4 c7 q1 ?4 Z
- GetDriverFunc=getSQLDriverMYSQL
$ b+ Y/ w+ \4 c# U% ?. D - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ z# d! V- X0 J - LibraryName=./libsqlmy.so
: A, s5 ?* G1 L- ~6 ] - Active=1
: A3 c- ]) B6 n e- h4 \8 n - ---example---6 i& b3 |5 u7 O! _# B* o; P5 A1 d" p
( [- e+ q$ T$ ~, s7 x1 U @# Z- On a windows box, also running the MySQL server locally, it would be:+ \( |/ m* `% L$ p2 B0 k+ M
- ---example---
e. a! I; h' C) u* k, n - [DBEXPRESS]5 H. ]0 `% Y; X" |8 a9 ?
- sqldir=mysql_sql/ H* M7 l' p5 v( e/ X
- Drivername=mysql
- r6 ]0 V2 }* A8 N0 V - Database=test d5 g2 I3 h! Y l
- Hostname=127.0.0.18 ^1 N) y* E6 g8 P
- User_name=testuser
3 v* X4 ~7 e- v7 ]8 c0 C - Password=my_password# D# r5 y) W9 M
- GetDriverFunc=getSQLDriverMYSQL/ y4 C& ^7 D: N
- VendorLib=libmysql.dll
5 \: `# i0 ^" V& q3 d: i5 X5 B - LibraryName=dbexpmysql.dll
( D- z: Q# c$ K4 P m+ F- H8 N - Active=1/ S# r7 e& Q; y) u
- ---example----0 A4 d5 R$ O5 B, H
- - written 02.03.04 by pwk.linuxfan6 `5 }' j. J7 Z: e, i' G% b$ A1 d
3 s4 a+ p" N8 S
复制代码 |
|