|
|
麻烦翻译一下,下面这段文章:xhan . S2 [3 j7 I9 x: k
" b4 ^! ^( U1 A( `( D- ; [! {7 p6 }3 |) \
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- \+ g r+ M+ t- c$ @- k( d0 p) W5 T! d
- % J) z4 M1 z4 l! o( k) g: i
- ### What we need ###
6 S% b; ^% P$ T- `2 \8 ` - Naturally, we will need a MySQL server to store the data for us, this document b( D/ M- ?8 K A
- will not explain how this can be done - there are documents out there for the
. T5 m7 `1 K# l- M1 B/ W& j# k" \. R - interested. The requirements include a (empty) database for TeamSpeak to use* ~1 X5 T$ S3 h/ h* f0 D
- and a user account (username + password) that has the permissions to do stuff
1 w( ^5 X& ?1 M$ i4 ?( f, b - with the database. Additionally, you will need a vendor library installed on the
" z4 Y6 F/ |1 e2 c - local machine, this came with my MySQL install.% V% U" B+ o: c' r$ V5 f& ?6 t
- These instructions will not tell you how you might transfer your data from the8 F$ h2 t: h' A7 v
- SQLite database to the MySQL database, we start with a clean and empty MySQL
' N$ o* ` `1 N! Y$ N( s - database.
; y$ w' z% a5 @- T7 Z - Some users have reported ways to import a SQLite database into MySQL, but at
N% |/ X1 N0 Y$ X+ u - the time of writing, there are still too many issues - check the current status4 K A, k1 H! j _' T$ Y
- in the TeamSpeak forums if you are interested.
" _" ]" w5 K% q. Z" Q - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 G* _: t: C* ~; O0 {2 }
- Borland was used. This driver can only interface with the client library that
: m# x" J* ^' h. }) m - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
& ^: r( {# E" M- X, c - client library - basically all you have to do is to use a 3.x client library as $ |! J- {! N* P/ a y
- "VendorLib" and a 4.x database to connect to.
9 j* b# o0 a7 u - If you need more info about dbExpress, you can contact Borland.. J8 N. _. V, g& k
0 b" D1 Q1 n. G" w& W0 X- ### Doing the work ###8 L, _0 \( \- a2 o& V1 @' j+ E
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
9 [& f8 q4 X [# l: y5 ?$ U - the perquisites right, just open your server.ini file, and add this section at7 c0 U5 e, H( v# }/ e) o
- the end:- i) C" W. x1 P4 J
- ---cut here---. [; I! Z% e4 [. O0 F0 ~
- [DBEXPRESS]4 h* c, J& L+ {% I7 |7 E
- sqldir=mysql_sql& M2 W6 W% l5 s: g2 M
- Drivername=mysql: N8 S; b( h# u0 y# o: @3 y
- Database=Your_Database_Name_Here
1 G) e% p8 O" A" d. ?- Z - Hostname=The_PC_the_MySQL-Server_is_on
$ o- `) a5 E6 c+ o - User_name=User_name_on_the_MySQL-Server
8 O- o4 c6 Z8 V+ M8 W( m% L% n, O - Password=Password_to_go_with_above_user_name
- J: K% t7 A/ }* O# k - GetDriverFunc=getSQLDriverMYSQL
" c) H% g6 N' j% Z - VendorLib=path_pointing_at_your_mysql_vendor_lib- z4 z+ M, w& }8 U5 \7 u6 `' d9 E& l
- LibraryName=path_to_libsqlmy_libary
% w3 w4 O( a* d* ~& q+ m7 h - Active=1
( B0 Z* c" C7 c8 n! N5 O - ---cut here---" e, X! |& n: I1 E( m" h
- In my environment (a linux box with a MySQL server running locally) I have:
# w' e, ~4 S) C+ P$ r0 o - ---example---( f5 y" U3 e9 B1 {. D: M3 J! X
- [DBEXPRESS]- B2 N% t# \! Z$ Z% u
- sqldir=mysql_sql
5 ]) E! Q: T& e3 B2 L. ]/ P* U ?! G$ ^ - Drivername=mysql
* m4 I3 p, z# N8 b - Database=test
' x, M, q l5 D5 T( X* k - Hostname=localhost
2 n3 h! I5 ~3 v4 @- m& B( r - User_name=testuser
! w2 K. _1 l/ r# V5 j8 ]8 p - Password=my_password
& z8 z, I, h/ j4 e - GetDriverFunc=getSQLDriverMYSQL
( ]1 v9 E1 j* O) t5 P - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ ?: Y" h0 s1 b4 k& \' ?
- LibraryName=./libsqlmy.so0 \, m5 p/ f+ q% g, E7 B& B% B ^
- Active=1" r I4 j' }3 ^) z. S3 e( A
- ---example---9 {# T* ^ ^ D% w2 w# V" E
- 1 y. l5 b% n: `( x3 y$ T
- On a windows box, also running the MySQL server locally, it would be:) t: c! ]! b2 @) ?% j6 N
- ---example---, ^3 r( p% N3 T/ ~8 g
- [DBEXPRESS]/ G& V. Y0 r6 S* G
- sqldir=mysql_sql
, v T# k/ o/ O% L& p* b - Drivername=mysql
' q6 {( k, S8 j - Database=test
+ O }5 B) g- I8 f2 C - Hostname=127.0.0.1 C, ?/ Z% ?* U0 O; ?
- User_name=testuser
5 P3 |% _$ I6 Y - Password=my_password8 @7 |. z) o4 p1 l
- GetDriverFunc=getSQLDriverMYSQL% c, j7 T' h0 R+ C9 m
- VendorLib=libmysql.dll
3 h1 `) ?" [" E7 r- O* c - LibraryName=dbexpmysql.dll
, P- r% [0 }4 | - Active=1
1 O1 y4 o3 h5 C9 Q# [ - ---example----; }+ A9 R$ V; m/ m- @
- - written 02.03.04 by pwk.linuxfan
( F, i* a0 p$ ?6 ]2 }
* }7 S1 b" [% j- G- f
复制代码 |
|