SQL Grey howto

Questions and answers about how to do stuff
Post Reply
m477
Posts: 11
Joined: 07 Dec 2012 03:01

SQL Grey howto

Post 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 :)
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: SQL Grey howto

Post 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 :)
Version eFa 4.x now available!
m477
Posts: 11
Joined: 07 Dec 2012 03:01

Re: SQL Grey howto

Post by m477 »

oh thanks darky, I wondered that :p
ge2000
Posts: 28
Joined: 23 Jan 2013 19:27

Re: SQL Grey howto

Post 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
m477
Posts: 11
Joined: 07 Dec 2012 03:01

Re: SQL Grey howto

Post by m477 »

oh cool, thanks for the tip
Post Reply