|
|
麻烦翻译一下,下面这段文章:xhan ! K! E o: `* u8 o$ D, ]
4 B" k& L! x7 B0 O" b. L* q1 ~
- , ^( U8 n1 T/ ]8 ^: [
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
) Q6 Q1 z# u% y! [: g0 b
, J3 _3 @# O' I0 r- O- ### What we need ###) A3 k3 k. z. E$ [: p3 Z
- Naturally, we will need a MySQL server to store the data for us, this document / L; y+ E9 z3 Y; K% L
- will not explain how this can be done - there are documents out there for the , z6 v6 k" o5 E3 M0 b
- interested. The requirements include a (empty) database for TeamSpeak to use Y& s4 E/ q& l+ K
- and a user account (username + password) that has the permissions to do stuff
, N- ~: H4 ~; j3 o - with the database. Additionally, you will need a vendor library installed on the
! ^6 J$ {, V6 A5 E3 } - local machine, this came with my MySQL install.
* X7 t' v, j% A4 Z1 d - These instructions will not tell you how you might transfer your data from the! t5 ]: x4 J( }" |9 ~
- SQLite database to the MySQL database, we start with a clean and empty MySQL
. t2 I1 J2 `$ M+ j2 S; p" U - database.
- {1 t7 o% [' @3 I - Some users have reported ways to import a SQLite database into MySQL, but at
. d7 n# o+ Z6 I* @) v: F1 M' O - the time of writing, there are still too many issues - check the current status
' @, }/ m4 z1 h0 ?$ ` - in the TeamSpeak forums if you are interested.
1 ~) U, K2 ~- D6 ?3 T- p/ m - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from. X+ t- H* X* S! W; C; ]
- Borland was used. This driver can only interface with the client library that
/ M1 m" p/ f5 a8 h$ d* { - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 w9 T: L& o: }0 U2 C( {
- client library - basically all you have to do is to use a 3.x client library as / `* ^$ `0 ~" L+ O/ j
- "VendorLib" and a 4.x database to connect to.
9 J- K, x2 T. p0 S. y' P - If you need more info about dbExpress, you can contact Borland.6 r0 l+ d2 R0 r9 z9 f2 q
( ^- t% K# I5 G& w- ### Doing the work ###* k _3 y1 f8 Z) o2 b' o
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 R5 |( c3 R2 B" w7 @ - the perquisites right, just open your server.ini file, and add this section at) a9 F4 c. g8 y, O: h* x
- the end:
' P# ]' n$ a8 \: j5 ]6 u/ K - ---cut here---8 J( H9 t7 ^7 H1 y& t
- [DBEXPRESS]
7 Y [3 V( a3 ` - sqldir=mysql_sql
' q, e1 ]5 k4 i$ K: k0 l/ H8 b( m9 a - Drivername=mysql
" _$ U9 \" u( p0 G. z, B - Database=Your_Database_Name_Here
) {& s- C! J' \3 s - Hostname=The_PC_the_MySQL-Server_is_on
8 G z, L9 b$ `1 L - User_name=User_name_on_the_MySQL-Server
}) D9 H% O4 l' W. h9 ^1 r0 h1 u6 ] - Password=Password_to_go_with_above_user_name. h5 E$ R. p" P6 q' O1 G* T
- GetDriverFunc=getSQLDriverMYSQL8 o. ?( Y+ I2 e X
- VendorLib=path_pointing_at_your_mysql_vendor_lib& O. \' f7 A: y/ n' M
- LibraryName=path_to_libsqlmy_libary
# Q- G: F1 s$ C - Active=1& o8 B! Q+ `4 O- P) G
- ---cut here---: S, k4 c6 v8 d) O8 t7 G( @& U7 h
- In my environment (a linux box with a MySQL server running locally) I have:- D& \9 K- O0 u5 I: E
- ---example---: v+ o: f' F6 N! U
- [DBEXPRESS]$ K' t" b: I q
- sqldir=mysql_sql
1 z. R- y2 H3 F: z - Drivername=mysql
4 a: [2 H; D* g& }& A - Database=test2 ^+ d7 B2 I5 y( D, f
- Hostname=localhost4 e. D8 A9 d" z9 i" V+ o h
- User_name=testuser
. y) y: L' m: y4 y( ]( C! ~ - Password=my_password
0 u% s9 y; H7 b4 Y x+ K - GetDriverFunc=getSQLDriverMYSQL
2 A) t, m# k/ i9 k; o& c* K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% v5 K+ d+ ~' q
- LibraryName=./libsqlmy.so
* K4 p+ j! H. n) x* `/ b2 _ - Active=1
# ^2 l/ _0 [0 @/ X4 K' W - ---example---
q( P8 U- ?& k - ! V w* W7 ]- p
- On a windows box, also running the MySQL server locally, it would be:9 [+ D! \' _# |" {: l: N9 L
- ---example---0 {7 D5 N3 T$ C$ U, P
- [DBEXPRESS]
( ?8 c0 [# Z: _) X: q0 s - sqldir=mysql_sql
- _! {) Q6 ^/ m - Drivername=mysql
1 t4 W( V4 B2 J - Database=test: Z/ @6 c6 S5 U; b# m; @7 O0 t
- Hostname=127.0.0.1. B* I% E6 p8 v3 `
- User_name=testuser
) q" s# ?# Q0 B- b% S - Password=my_password' r$ |* Y, v0 j! s8 w
- GetDriverFunc=getSQLDriverMYSQL
+ X6 O" Q* B' Y3 W - VendorLib=libmysql.dll
$ k x. \. k0 L - LibraryName=dbexpmysql.dll
# j5 e. b5 ]7 D3 F: ^! Y - Active=1. j: P3 a0 P# d2 R% T; J5 I* u8 Q! V. L
- ---example----, r& `: b! w9 Y# f8 H' S& T
- - written 02.03.04 by pwk.linuxfan: o2 a- R3 s- h, u6 n) o2 o, U1 T
- 8 p" k! _9 f0 T) d( J
复制代码 |
|