Hi Xander, thanks for reply. But I have selinux disabled, because of another appliaction. However I have set sebools: httpd_can_network_connect --> on httpd_can_network_connect_db --> on
It was php.ini setting "sql.safe_mode = On". I changed to Off and it now works. Thanks to all. Best Regards John On 28 October 2014 17:40, Xander D Harkness <[email protected]> wrote: > Centos ought to have selinux on by default. > > By default apache cannot connect to the network. > > You can change this by entering the command as root: > /usr/sbin/setsebool httpd_can_network_connect 1 > > setsebol is installed by the package policycoreutils > > Cheers > Xander > > On 28 Oct 2014, at 17:32, Honza Burian <[email protected]> wrote: > >> Hi Sudhir, >> >> thanks for your response. This is typo in email only. I checked >> privileges with show grants. Also I tried connection to db with CLI >> and mysql command. That works. >> >> But I had an idea to try connection over PHP script. So I wrote a >> moment ago a php script to connect to database. >> It returns: >> Notice: mysql_connect(): SQL safe mode in effect - ignoring >> host/user/password information in >> /var/www/html/owncloud/test_mysql.php on line 8 >> Warning: mysql_connect(): Access denied for user 'root'@'localhost' >> (using password: NO) in /var/www/html/owncloud/test_mysql.php on line >> 8 >> Unable to connect to MySQL >> >> So there is some SQL safe mode which is ignoring host/user/password >> parameters and then the mysql_connect() uses defalt root@localhost. >> I just don't understand how roundcube is working with MariaDB when >> ownCloud don't. >> >> Is it safe to turn sql.safe_mode to off? >> >> Regards >> John >> >> On 28 October 2014 17:13, Sudhir Khanger <[email protected]> wrote: >>> On Tuesday, October 28, 2014 05:06:46 PM Honza Burian wrote: >>>> 4) grant all privileges on ownclou.* to 'owncloud'@'localhost'. >>> >>> I don't know if this is a typo in email or your system. You need to use >>> owncloud.* instead of ownclou.*. >>> >>> -- >>> Regards, >>> Sudhir Khanger, >>> sudhirkhanger.com, >>> github.com/donniezazen, >>> 5577 8CDB A059 085D 1D60 807F 8C00 45D9 F5EF C394. >>> _______________________________________________ >>> User mailing list >>> [email protected] >>> http://mailman.owncloud.org/mailman/listinfo/user >>> >> _______________________________________________ >> User mailing list >> [email protected] >> http://mailman.owncloud.org/mailman/listinfo/user > > -- > Xander D Harkness > Mobile: +46 702 66 77 47 > Land Line: +46840309642 > [email protected] > > > _______________________________________________ > User mailing list > [email protected] > http://mailman.owncloud.org/mailman/listinfo/user > _______________________________________________ User mailing list [email protected] http://mailman.owncloud.org/mailman/listinfo/user
