|
|
麻烦翻译一下,下面这段文章:xhan 3 o& f4 U9 ?( }- Y0 `3 v# ~4 I
& ?/ j* w$ l8 N6 I/ Q" }# R-
& j! P9 `/ O# W1 t. c5 ]; b - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 F; \3 H: e5 Q
- T4 J0 J; M m
- ### What we need ###
0 Z: S1 O4 T, Z; W' U& g - Naturally, we will need a MySQL server to store the data for us, this document : |" h9 l$ I' M E8 F
- will not explain how this can be done - there are documents out there for the
1 |% T' n9 y) y: h9 k - interested. The requirements include a (empty) database for TeamSpeak to use3 o8 h5 U; q" b# ^
- and a user account (username + password) that has the permissions to do stuff
: e6 m4 e- E' c0 S - with the database. Additionally, you will need a vendor library installed on the
2 i3 G; }/ y+ g* p/ t" g - local machine, this came with my MySQL install.! z! b5 m2 w9 M. M1 V" b% m
- These instructions will not tell you how you might transfer your data from the
6 M2 |5 T0 h( N. }: g - SQLite database to the MySQL database, we start with a clean and empty MySQL
9 G" X6 j" _4 U6 b - database.
1 {- F% ~6 E# U4 j- s( } - Some users have reported ways to import a SQLite database into MySQL, but at! T) T- [0 j) U! f
- the time of writing, there are still too many issues - check the current status
( q# T/ q& p+ e/ z+ \2 T* V% a4 r- [ - in the TeamSpeak forums if you are interested.& F9 V2 ]5 M# q" H: Z$ b- @& \
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
; \! D# r+ o% n8 S8 H - Borland was used. This driver can only interface with the client library that . l. H9 V+ U8 A1 J( t0 L
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, P: ?3 s; ?2 \0 c, c% H
- client library - basically all you have to do is to use a 3.x client library as
% X$ B' z/ p- L' P - "VendorLib" and a 4.x database to connect to.
% e& q& f) v6 B& W, }* x } - If you need more info about dbExpress, you can contact Borland.. _7 K' i# S4 f; ^0 ~+ I
- 8 X" L5 e9 ~' ^7 L: r( `$ p
- ### Doing the work ###
: Z8 r o/ M+ _6 m/ Y1 l8 \( M - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ a: i$ I: M* r
- the perquisites right, just open your server.ini file, and add this section at
$ m/ f3 n5 V9 p# N, c. j - the end:3 d. n2 a% S$ _2 [7 E! F
- ---cut here---
& J$ S. x9 `% `+ ` - [DBEXPRESS]
9 ~6 |" Y$ X* P0 q, I+ ]% } - sqldir=mysql_sql
5 U' V" k9 e8 Q( M - Drivername=mysql. Q) {1 E2 [ a) X: ? b: a
- Database=Your_Database_Name_Here, x- o& m1 \6 R' {: O+ o
- Hostname=The_PC_the_MySQL-Server_is_on
) e+ s+ I8 O2 u - User_name=User_name_on_the_MySQL-Server3 x: E l0 r. ]! u5 s
- Password=Password_to_go_with_above_user_name
, B) r3 x6 _* i9 c - GetDriverFunc=getSQLDriverMYSQL
: U" e5 |" f# {$ y1 m& w3 s - VendorLib=path_pointing_at_your_mysql_vendor_lib
" c. y5 K: o: M& L7 R - LibraryName=path_to_libsqlmy_libary
2 w7 U9 Y2 S" }) L3 ^5 h8 P) A5 J - Active=16 P% r5 W P9 ]. z. f% M0 H( x+ L
- ---cut here---
( n6 e' n! L$ O: F. S6 X! F2 U) ?2 A - In my environment (a linux box with a MySQL server running locally) I have:
* X1 |4 o |1 B& S6 W - ---example---% a3 t+ v$ i0 ~" f. Z
- [DBEXPRESS]
4 v, u( ?/ W& ? a" f( d3 d4 m* K6 \* E - sqldir=mysql_sql
, g; V- a# O" j - Drivername=mysql0 o; J" Y& V' S
- Database=test9 z% ?7 i" s* L, _& H
- Hostname=localhost
W7 e1 s% L' ~0 A9 D6 m - User_name=testuser
, `! J0 Y8 `, q% L - Password=my_password6 ^6 y* d+ s3 a: f- Q0 n! x# j
- GetDriverFunc=getSQLDriverMYSQL
' Y; K/ A }# g- p6 ^/ } - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
]: r% a6 D* {5 C7 b - LibraryName=./libsqlmy.so
% M# m5 t6 c# j$ L4 ?( T I' c* E# f - Active=1
* m& Q# i! k# R. C& Y - ---example---' f' q. T9 z! n2 S* f* d6 A
- 5 N' d* s ~# B. K& c1 M2 N
- On a windows box, also running the MySQL server locally, it would be:
- {) j: S. r1 i# L$ b! E0 M- v: |/ | - ---example---
8 v, `6 |( d' ` - [DBEXPRESS]8 ~ J! @. t+ e0 m T0 `) f
- sqldir=mysql_sql& c- o5 r* l5 F' C K1 h
- Drivername=mysql
8 K l% c. K& q8 p% I - Database=test7 H4 v* b0 D1 ]2 \, N
- Hostname=127.0.0.16 D3 j4 l8 E2 @: W% N* F
- User_name=testuser
' h) u/ F7 Y/ {& j, n0 [ - Password=my_password0 w6 G( u3 f. V; s9 W$ g
- GetDriverFunc=getSQLDriverMYSQL8 t, k( ^! K9 I1 B$ }
- VendorLib=libmysql.dll
- a I% E0 F( }& {( m! D; ^+ z4 ] - LibraryName=dbexpmysql.dll
: |$ H2 E* \1 h2 h - Active=13 x$ e. Q& `; ~1 b' y! [
- ---example----' {6 s7 `# s( ^* H1 E
- - written 02.03.04 by pwk.linuxfan
( t) R2 x0 ]# N( `' {# x
' b* n) J! g3 [" D
复制代码 |
|