Author Topic: [SOLVED] mysql connect  (Read 4041 times)

Offline guletz2002

  • Newbie
  • *
  • Posts: 3
[SOLVED] mysql connect
« on: June 04, 2014, 03:14:22 AM »
Hello,

I am a new roundube user. I make a setup with a mysql cluster(4 nodes active/active, all in rw mode). But because I can not figure how to modify the db_dsnw, for a tcp connection to the mysql, not a socket one(I try some tcp from pear_db documentation, but is not working), I have some cluster issues!!! So, my qustions are:

1. Can I use a tcp connection insted of a socket one?
- if the answer at 1. is yes, then:

2. Could anybody post a simple example, for me(user="triangle_cube", passwd="hexagon", mysql_IP="192.168.222.100", db_name="superb_web_mail")?


PS: I use the last stable version on roundcube.

Thx. in advance,

 Iulian





« Last Edit: June 05, 2014, 09:36:01 AM by guletz2002 »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: mysql connect
« Reply #1 on: June 04, 2014, 07:12:47 AM »
Quote
1. Can I use a tcp connection insted of a socket one?

yes

Quote
2. Could anybody post a simple example, for me(user="triangle_cube", passwd="hexagon", mysql_IP="192.168.222.100", db_name="superb_web_mail")?

mysql://triangle_cube:hexagon@192.168.222.100/superb_web_mail
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline guletz2002

  • Newbie
  • *
  • Posts: 3
Re: mysql connect
« Reply #2 on: June 04, 2014, 11:48:39 AM »
Quote
1. Can I use a tcp connection insted of a socket one?

yes

Quote
2. Could anybody post a simple example, for me(user="triangle_cube", passwd="hexagon", mysql_IP="192.168.222.100", db_name="superb_web_mail")?

mysql://triangle_cube:hexagon@192.168.222.100/superb_web_mail


Are you sure? Not working, and the syntax is:

phptype(syntax)://user:pass@protocol(proto_opts)/database

... so I try even this:


mysql://triangle_cube:hexagon@tcp(192.168.222.100)/superb_web_mail, an the same response : ...... SOCKET (... could not connect on socket /var/lib/....)




Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: mysql connect
« Reply #3 on: June 05, 2014, 02:41:18 AM »
yes i'm sure. what is said is the same as the example provided in the rc config file ;)

are you sure you are putting it in the correct place? assuming you are using rouncube 1.x then it needs to be set in `$config['db_dsnw']` in config.inc.php

have you tried using the same details to connect to mysql using another client or the command line, just to confirm that the mysql is ok?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline guletz2002

  • Newbie
  • *
  • Posts: 3
Re: mysql connect
« Reply #4 on: June 05, 2014, 09:34:05 AM »

   Yessssssssssssssss!!!!! Thx. you very much! My mistake.....! No my roundcube cluster(4 active nodes - load-balancing and fail-over) is fully operational.

Off-topic: the cluster method who is describe in the roundcube wiki it is the worst case posbible and is not scale-able(I reffer only when it is use mysql). If someone want details, plese disturb me ;)

Thx. again!!!