https database connection
Added by Jumbz Tayamen almost 12 years ago
I deployed a goautodial server on one server and another centos, installed only with mysqld and its pre-requisites.
I am able to ssh to and from both machines, also I am able to connect to the remote database with mysql -u <user> -h x.x.x.x -p i can get a mysql> prompt from asterisk server to database.
but when connecting to the webserver via https://ipaddress i get a database connection error, ünable to connect to your database using the provided settings
I have edited both dbconnect.php (one is inside the agent directory /var/www/html/agc/agent/dbconnect.php and one at /var/www/html/agc) by hand to reflect $VARDB_server="x.x.x.x"; $VARDB_user="cron"; $VARDB_pass="1234"
I also checked if the goautodial installation used /etc/goautodial.conf or /etc/astguiclient.conf <- I removed both and stopped the mysqld service. returned one file at a time while the other remained renamed either goautodial.conf or astguiclient.conf
even without both files (and with the dbconnect.php reflecting the remote server) I still get the database connection error.
are there other files that need to be edited that the webserver is using to connect to the database?
again I can connect remotely to the remote database using mysql -u <user> -h <ip>
I created the centos 6.4 install using the scratch install documents, deploying only relevant to mysql instructions (no asterisk/web)
What am I missing?
Replies (5)
RE: https database connection
-
Added by Jumbz Tayamen almost 12 years ago
another test I did was to run the update_server_ip and ADMIN_update_server_ip both connected to the database fine (updated relevant tables)
RE: https database connection
-
Added by franz romell almost 12 years ago
Im also facing the same problem can someone please post how to fix it? I did the updates on every ip but theres nothing..thanks
RE: https database connection
-
Added by Demian Biscocho almost 12 years ago
Please post your /etc/goautodial.conf contents here.
RE: https database connection
-
Added by franz romell almost 12 years ago
- Goautodial Service Connection
VARSERVHOST => 127.0.0.1
VARSERVPORT => 707
VARSERVLISTEN => 20
VARSERVLOGGING => Y
VARSERVLOGS => /var/log/goautodial
VARUSRPATH => /usr/share/goautodial
VARWWWPATH => /var/www/html
VARKEEPALIVE => 1
- Database connection information
VARDBserver => 192.168.135.8
VARDBdatabase => goautodial
VARDBuser => goautodialu
VARDBpass => pancit888
VARDBport => 3306
my database is located on another server the ip adddress is 192.168.135.8 ...
RE: https database connection
-
Added by Demian Biscocho almost 12 years ago
First run "yum update" to apply the latest bugfixes and updates. Your /etc/goautodial.conf should look like this:
# Goautodial Service Connection VARSERVHOST => 127.0.0.1 VARSERVPORT => 707 VARSERVLISTEN => 20 VARSERVLOGGING => Y VARSERVLOGS => /var/log/goautodial VARUSRPATH => /usr/share/goautodial VARKEEPALIVE => 1 # Database connection information VARDBserver => localhost VARDBdatabase => goautodial VARDBuser => goautodialu VARDBpass => pancit888 VARDBport => 3306 #CIconfig # database configuration for goautodial database &db[goautodialdb][hostname]=localhost &db[goautodialdb][username]=goautodialu &db[goautodialdb][password]=pancit888 &db[goautodialdb][database]=goautodial &db[goautodialdb][dbdriver]=mysql &db[goautodialdb][dbprefix]= &db[goautodialdb][pconnect]=FALSE &db[goautodialdb][db_debug]=TRUE &db[goautodialdb][cache_on]=FALSE &db[goautodialdb][cachedir]= &db[goautodialdb][char_set]=utf8 &db[goautodialdb][dbcollat]=utf8_general_ci # database configuration for asterisk &db[dialerdb][hostname]=localhost &db[dialerdb][username]=cron &db[dialerdb][password]=1234 &db[dialerdb][database]=asterisk &db[dialerdb][dbdriver]=mysql &db[dialerdb][dbprefix]= &db[dialerdb][pconnect]=FALSE &db[dialerdb][db_debug]=TRUE &db[dialerdb][cache_on]=FALSE &db[dialerdb][cachedir]= &db[dialerdb][char_set]=utf8 &db[dialerdb][dbcollat]=utf8_general_ci # database configuration for customdialerdb &db[customdialerdb][hostname]=localhost &db[customdialerdb][username]=custom &db[customdialerdb][password]=custom1234 &db[customdialerdb][database]=asterisk &db[customdialerdb][dbdriver]=mysql &db[customdialerdb][dbprefix]= &db[customdialerdb][pconnect]=FALSE &db[customdialerdb][db_debug]=TRUE &db[customdialerdb][cache_on]=FALSE &db[customdialerdb][cachedir]= &db[customdialerdb][char_set]=utf8 &db[customdialerdb][dbcollat]=utf8_general_ci # database configuration for limesurvey &db[limesurveydb][hostname]=localhost &db[limesurveydb][username]=goautodialu &db[limesurveydb][password]=pancit888 &db[limesurveydb][database]=limesurvey &db[limesurveydb][dbdriver]=mysql &db[limesurveydb][dbprefix]= &db[limesurveydb][pconnect]=FALSE &db[limesurveydb][db_debug]=TRUE &db[limesurveydb][cache_on]=FALSE &db[limesurveydb][cachedir]= &db[limesurveydb][char_set]=utf8 &db[limesurveydb][dbcollat]=utf8_general_ci&
Edit httpd.conf
#nano /etc/httpd/conf/httpd.conf
Go to line 327
AllowOverride None
Change this to:
AllowOverride All
Save and exit. Reload or restart HTTPD
#service httpd restart