Page 1 of 1

SQL Grey howto

Posted: 07 Dec 2012 06:41
by m477
MySQL
view the current root password

Code: Select all

cat /etc/mysql/EFA.cnf
This will show the current root password

SQLGrey
Install SQLGrey

Code: Select all

apt-get install sqlgrey
Configure

Code: Select all

vim /etc/sqlgrey/sqlgrey.conf
Set up the database configuration:

Code: Select all

db_type = mysql
db_name = sqlgrey
# Note: the following are not used with SQLite
db_host = localhost
db_port = default
db_user = sqlgrey
db_pass = ******
SQLGrey creates it’s table structure itself.

Create SQLGrey user and database

Connect to the mysql server using the root password

mysql –uroot –ppassword

Run the following SQL statement, replacing the password if need be

Code: Select all

create database sqlgrey; grant usage on sqlgrey.* to sqlgrey@localhost identified by '******'; grant all privileges on sqlgrey.* to sqlgrey@localhost;
Restart sqlgrey

Code: Select all

/etc/init.d/sqlgrey restart
Configure Postfix
vim /etc/postfix/main.cf
Add to the end of smtpd_recipient_restrictions:
, check_policy_service inet:127.0.0.1:2501
Whole line will read:

Code: Select all

smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_destination, whitelist_policy, rbl_policy, spf_policy, check_policy_service inet:127.0.0.1:2501
Restart Postfix:

Code: Select all

/etc/init.d/postfix reload

And of course test :)

Re: SQL Grey howto

Posted: 07 Dec 2012 12:35
by darky83
I made a small change in the mysql root item.

the pwd is stored at /etc/mysql/EFA.cnf, and is randomly generated during startup (this way we can use the EFA-configure script later on the automatically configure new features.)
If you manually change the root password this will break this item (maybe I should create a new 'root kinda of user just for EFA)

But good work :)

Re: SQL Grey howto

Posted: 10 Dec 2012 03:00
by m477
oh thanks darky, I wondered that :p

Re: SQL Grey howto

Posted: 28 Jan 2013 10:07
by ge2000
Thanks for the post. Works great.

Additionally I installed http://www.vanheusden.com/sgwi/ so that that SQLGrey can be managed and monitored.

--Ge

Re: SQL Grey howto

Posted: 01 Feb 2013 03:51
by m477
oh cool, thanks for the tip