Redmine#
Run SQL commands#
Via shell#
Connect to the server as the
report_user
user:curl --silent --connect-timeout 1 crm.open-contracting.org:8255 || true ssh report_user@crm.open-contracting.org
Open a MySQL console:
mysql redmine -u report -p
Via application#
Create an SSH tunnel as the
report_user
user, to forward MySQL’s port 3306 to a port number of your preference, for example:curl --connect-timeout 1 http://crm.open-contracting.org:8255/ ssh -N report_user@crm.open-contracting.org -L 3307:localhost:3306
Use any of the applications described at SQL databases. The general configuration is:
- Host
localhost
- Port
3307 (as above)
- Database
redmine
- User
report
If using the
mysql
command, set the protocol:mysql redmine --host localhost --port 3307 --protocol TCP --user report -p
Open interactive consoles#
Connect to the server as the
redmine
user:curl --silent --connect-timeout 1 crm.open-contracting.org:8255 || true ssh redmine@crm.open-contracting.org
Change to the Redmine application’s directory:
cd /home/redmine/public_html
Open a Rails console:
bundle exec rails console --environment=production
Or, open a MySQL console (password in
config/database.yml
):bundle exec rails dbconsole --environment=production