|
|
麻烦翻译一下,下面这段文章:xhan
( J2 j+ {/ t G$ T1 R- w" A) Q, S- T/ b! f7 v. G( l; c
- ! v ?) ^6 c) C' u3 |# s( I/ ]$ u
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
. Z& J0 D c, y8 @$ K
. W! Y- x. ?( }% D8 t- ### What we need ###
, {8 x4 _ D* o1 F$ y - Naturally, we will need a MySQL server to store the data for us, this document 1 x5 _0 K$ X1 B* `: D
- will not explain how this can be done - there are documents out there for the
) Y# j3 j! C1 n# z0 t - interested. The requirements include a (empty) database for TeamSpeak to use7 z9 S- C: S7 b" J7 J+ ~0 N; Y
- and a user account (username + password) that has the permissions to do stuff) s& b, Z' F D7 b9 R( o1 n& w
- with the database. Additionally, you will need a vendor library installed on the
# S, \. p( J2 X0 o0 ` - local machine, this came with my MySQL install.7 d" t1 B( u# _: T
- These instructions will not tell you how you might transfer your data from the5 T6 }; j% Q" g
- SQLite database to the MySQL database, we start with a clean and empty MySQL
. P. e- J1 s: `5 V! C - database.
" s3 d2 ^9 m+ R$ y2 ^ - Some users have reported ways to import a SQLite database into MySQL, but at7 r/ v8 x% F, j, Y3 n
- the time of writing, there are still too many issues - check the current status( Z9 S3 E6 I. w2 ]: w$ e6 t0 U
- in the TeamSpeak forums if you are interested./ z9 ^: _2 A# U3 w( {2 k
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
2 M& v! x1 X' a, c; Y- k6 U - Borland was used. This driver can only interface with the client library that : E1 k* K3 h- m% j, O* a( r
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ v8 T6 n: v4 O
- client library - basically all you have to do is to use a 3.x client library as
) {0 L) q! `/ L$ y - "VendorLib" and a 4.x database to connect to.
, |3 ?. X u/ T, T - If you need more info about dbExpress, you can contact Borland.
9 K, }4 P6 B9 o) B/ e - ! a/ k+ N9 m; E' [( H9 l- }
- ### Doing the work ###
; D' f( O( A' j7 {) z0 r - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( m! c$ W" H+ C) a* m+ s, e. B* ?& A
- the perquisites right, just open your server.ini file, and add this section at
0 ?0 x( P3 e8 K) _ - the end:* C: h8 S" H/ K. W- e+ t
- ---cut here---" R4 _- d! y! K% i5 _) B: R. G
- [DBEXPRESS]* A) a3 R _5 [) Q
- sqldir=mysql_sql
`! {6 d% ^7 K0 ?. m4 f7 `3 | - Drivername=mysql0 {! | K2 D2 S+ ? h. f
- Database=Your_Database_Name_Here7 `. f2 j' y. [" d4 ^' @
- Hostname=The_PC_the_MySQL-Server_is_on
: M+ U Z' G3 F/ M6 q8 y - User_name=User_name_on_the_MySQL-Server
' ^% Y0 r: r: m3 y - Password=Password_to_go_with_above_user_name
1 z* A% L4 R1 R6 S" z, h9 K - GetDriverFunc=getSQLDriverMYSQL
& e; Y, ?8 _- V - VendorLib=path_pointing_at_your_mysql_vendor_lib
( m6 j, Y0 A( c' L9 \; E) ^% E - LibraryName=path_to_libsqlmy_libary" `9 B- s7 Z' l
- Active=1
0 y* G2 m7 { Y8 f4 Z N! S - ---cut here---) s8 g: [. x r" R4 x
- In my environment (a linux box with a MySQL server running locally) I have:( w2 L) z: p6 ]$ _* Z9 w! C s& B
- ---example---* h# P1 J/ K$ z7 C
- [DBEXPRESS]
1 m. d& [) x7 A3 m0 y% m - sqldir=mysql_sql
, t. Q3 f! }! U, B4 |, ] - Drivername=mysql
8 ~7 k' O: Q' F( L - Database=test% @$ W3 b+ N- |' a/ R$ g
- Hostname=localhost) r/ Y' Y* w& Z, i( g
- User_name=testuser
1 g/ P I: q3 b- P2 X- C - Password=my_password0 Z0 E, R: [2 i [0 _6 V0 _5 @
- GetDriverFunc=getSQLDriverMYSQL5 l( K/ t: j4 H9 [
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0+ M g& f/ z8 q) |; K6 h
- LibraryName=./libsqlmy.so- i* z" }* O* W: H1 ^( ~
- Active=1 t$ J) t! c1 f, A
- ---example---& o' i5 [0 f. m$ [ [6 |3 T* _
- 0 a* A$ B# {0 ^* m
- On a windows box, also running the MySQL server locally, it would be:3 O# ~7 Q! T" Q7 p4 S$ Z) [
- ---example---! F; W+ O* ~) q0 \' h/ h
- [DBEXPRESS]- c1 v$ k, D$ C; N- H9 [# S& B
- sqldir=mysql_sql+ I/ d) G2 ]" Q9 x: X+ Y
- Drivername=mysql
1 _; Z3 N# ^+ K - Database=test
% A# e; n% D9 O" q) b - Hostname=127.0.0.1) v4 }: L Q4 Y6 z# l
- User_name=testuser
- F3 F' ?+ r$ ?* D - Password=my_password
$ `+ W. g9 U: N# n0 l! o9 \ - GetDriverFunc=getSQLDriverMYSQL; Z% I7 C. L5 O! m6 N4 ?
- VendorLib=libmysql.dll
( h1 _# w8 O; m/ P* A { - LibraryName=dbexpmysql.dll
: S" } ]& v/ g% Y3 G0 E - Active=14 f: x9 R( e6 c) I( ]! N8 o+ {
- ---example----
4 K1 `( \; k+ A1 z; k - - written 02.03.04 by pwk.linuxfan: I9 P, Q+ E. U+ g
- 7 F! P$ S/ \5 P
复制代码 |
|