database.json 772 B

123456789101112131415161718192021222324252627282930313233343536
  1. {
  2. "database": {
  3. "account": {
  4. "root": {
  5. "user": "root",
  6. "password": "123456"
  7. }
  8. },
  9. "serverInfo": {
  10. "server1": {
  11. "write": {
  12. "host": ["web-mysql"],
  13. "port": 3306,
  14. "timeout": 2,
  15. "account": "root"
  16. },
  17. "read": {
  18. "host": ["web-mysql"],
  19. "port": 3306,
  20. "timeout": 2,
  21. "account": "root"
  22. }
  23. }
  24. },
  25. "databases": {
  26. "wonderful": {
  27. "serverInfo": "server1",
  28. "startConns": "swoole_cpu_num()*10",
  29. "maxSpareConns": "swoole_cpu_num()*10",
  30. "maxSpareExp": 3600,
  31. "maxConns": "swoole_cpu_num()*20",
  32. "charset": "utf8mb4"
  33. }
  34. }
  35. }
  36. }