|
|
麻烦翻译一下,下面这段文章:xhan 3 i @: B2 p' M8 P
) e7 |: S( [8 x: T! C7 z5 }
-
/ ~( |4 j: e0 Q - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ z4 L7 h7 G* B7 u* Z, W. Q4 }
- # {* f9 s8 h' S3 x
- ### What we need ###$ ~/ `, h$ j/ S# G8 e, S2 Y
- Naturally, we will need a MySQL server to store the data for us, this document 3 [3 v! B# V( _6 j# x5 N) g: Z0 W
- will not explain how this can be done - there are documents out there for the ( g% \' b$ g& m2 P! G# F* o& v0 O
- interested. The requirements include a (empty) database for TeamSpeak to use
. R7 z) |3 l) r1 ^% f7 z - and a user account (username + password) that has the permissions to do stuff6 X& F5 E8 V+ D
- with the database. Additionally, you will need a vendor library installed on the
B N; m$ d* V7 U0 Z5 O @ - local machine, this came with my MySQL install.
* s$ G$ Y# G! p& X+ W' N0 [& y - These instructions will not tell you how you might transfer your data from the# v5 ]8 U. Y2 _
- SQLite database to the MySQL database, we start with a clean and empty MySQL) q/ t {. U) y- \1 O, B( v: f
- database.* l% b6 B& j* G X8 V# A
- Some users have reported ways to import a SQLite database into MySQL, but at
& T x( W- S7 r' l1 m - the time of writing, there are still too many issues - check the current status
1 i( ~2 H2 x% n( i - in the TeamSpeak forums if you are interested.
' Y1 B: k* T0 S( f( E5 U - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
' D# X( ^3 d$ _' R! s4 o9 o* f# d: z, i - Borland was used. This driver can only interface with the client library that
' o I1 T4 x0 T0 r# l" ?* o - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 S5 ?; b4 j8 d- ~/ U0 t
- client library - basically all you have to do is to use a 3.x client library as & h5 v& M4 k5 m6 p- _
- "VendorLib" and a 4.x database to connect to.
1 ^& D' }9 G' m& p) q S1 M - If you need more info about dbExpress, you can contact Borland.+ Z! s# I+ p) X, {' V4 p6 j1 {
+ `' ]% _0 c7 ?- ### Doing the work ###2 O E# p& e+ E% [
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# _; x3 j& \9 m! I% O0 Z- x/ B) H - the perquisites right, just open your server.ini file, and add this section at
5 O6 }( U4 r) V5 n( j8 E6 g# ^1 ` - the end:
5 v4 Z7 f- a& B, j) g6 z - ---cut here---+ J; `/ L2 @ x; w
- [DBEXPRESS]
1 }. K# r5 R3 E" L: y - sqldir=mysql_sql+ m6 C0 X8 k+ ^5 R
- Drivername=mysql# T- P% J, I# }2 G6 a$ m
- Database=Your_Database_Name_Here
1 F: E( \% k# @8 E* A - Hostname=The_PC_the_MySQL-Server_is_on
) R' Z1 \4 s' e+ o2 i, ]. r - User_name=User_name_on_the_MySQL-Server
4 k F9 O J2 u5 p - Password=Password_to_go_with_above_user_name
: ~, f. S) n* M - GetDriverFunc=getSQLDriverMYSQL/ [( h2 M: B4 I
- VendorLib=path_pointing_at_your_mysql_vendor_lib' j {# ]# F/ f7 |/ r3 z- J& {
- LibraryName=path_to_libsqlmy_libary1 N% ?# U( a/ q! L) ^+ F4 t( L( b
- Active=1
* {, A6 A; q5 Y; P - ---cut here---. X* G. F6 k( O4 }) ]5 n& Y
- In my environment (a linux box with a MySQL server running locally) I have:+ j( C; y a) a
- ---example---3 E8 E) W" J S3 ^0 s8 Q! P
- [DBEXPRESS]" q- g; N( g* `/ a0 u: u! q v; r r' G
- sqldir=mysql_sql
& T) E0 F) j% M0 ]$ \+ |( ^ - Drivername=mysql
|0 k( z/ g% H2 e - Database=test) }4 j/ y P0 I/ \' E c; C4 N
- Hostname=localhost2 V; D; c2 ~# E; q6 \
- User_name=testuser: m' O/ Z9 b% v- @; C; P" S' I0 U
- Password=my_password
& Y: ~1 L; \/ V1 P - GetDriverFunc=getSQLDriverMYSQL4 r4 e$ d8 ^3 M2 Z- Q
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; z2 W4 P$ F8 |5 Z - LibraryName=./libsqlmy.so
: M+ X1 L+ T/ V - Active=1+ q7 m5 T6 K( c& j6 @, S- v
- ---example---) k4 ?( M- Q- j7 R7 F
9 b' x& ]1 r5 z9 g) a' i- On a windows box, also running the MySQL server locally, it would be:
9 _" I8 i( B n- x `7 J; A - ---example---
( x" [: g, @$ e/ W: d: y j - [DBEXPRESS]
7 h8 c. e2 `, H& j( z - sqldir=mysql_sql
' f* C% R" [2 K8 D+ D- F - Drivername=mysql# r. E1 l% E/ E8 D
- Database=test
+ ~2 h9 f& @9 @9 o0 J' N) [* J, a - Hostname=127.0.0.1
j$ R) y. p6 ?4 a7 I7 @/ X - User_name=testuser
: K- a% @: N' X+ E0 l - Password=my_password3 k: b5 ]1 q9 w
- GetDriverFunc=getSQLDriverMYSQL" U$ i/ h: d1 @' N! n: P
- VendorLib=libmysql.dll$ Q" h8 ]6 E m# ?
- LibraryName=dbexpmysql.dll8 k- h* E# J M! j; G$ d# J
- Active=1& f, X( k+ I9 k2 @" M' Y
- ---example----
M" h, c3 c! F5 f - - written 02.03.04 by pwk.linuxfan
! j' Y4 K' T4 y3 G' a
& O& U3 S" R# f7 P' L" O
复制代码 |
|