postgresql - can't create database - OperationalError: source database "template1" is being accessed by other users - Stack Overflow
stackoverflow howto troubleshoot postgresql cannot create database error fix example guide reference process template commandline cli unix linux
5 weeks ago by racl101
stackoverflow howto troubleshoot postgresql cannot create database error fix example guide reference process template commandline cli unix linux
5 weeks ago by racl101
Backup (mysql dump) all your MySQL databases in separate files - Running with Ruby
november 2018 by racl101
Really good, simple to understand Bash shell script demonstrating how to backup all the databases in a given mysql server installation into a single file or into separate files (one for each database).
blog
tutorial
howto
example
guide
reference
backup
export
database
dump
sql
files
shell
script
single
separate
mysql
bash
november 2018 by racl101
major/MySQLTuner-perl: MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
github mysql database administration dba perl tuner script project totry tolearn tounderstand guide reference tuning settings configuration performance
october 2018 by racl101
github mysql database administration dba perl tuner script project totry tolearn tounderstand guide reference tuning settings configuration performance
october 2018 by racl101
Script to open a mysql database in Sequel Pro from a service in docker-compose.
october 2018 by racl101
A gist of an Bash Shell Script to open up Sequel Pro MacOS / MacOS X app with credentials to view a MySQL database running within a Docker container.
github
gist
script
bash
shell
open
sequel
pro
sequelpro
database
mysql
docker
container
credentials
totry
guide
reference
october 2018 by racl101
Connecting to a mysql running on a Docker container · Issue #95 · docker-library/mysql
october 2018 by racl101
Frankly, this forum page has no consensus on a solution to this issue. Nevertheless, what worked for me on my set up with running MacOS as the Docker host and running a container with: Ubuntu 16.04 and MySQL 5.7 is the following:
1) Within the container: change in /etc/mysql/mysql.conf.d/mysqld.cnf the bind-address option from 127.0.0.1 to 0.0.0.0
2) Restart MySQL server (note that whenever you start MySQL you must use this command in the Dockerfile:
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start
That is, you must touch the files in /var/lib/mysql and then start the server with service command and not systemctl.
Next, create a user separate from root e.g. dev_1, in MySQL and given them privileges to their '0.0.0.0' and '%' hosts. Like this in the Dockerfile:
RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start && mysql -uroot -proot mysql -e "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; CREATE USER 'dev_1'@'0.0.0.0' IDENTIFIED BY 'secret'; GRANT ALL ON *.* TO 'dev_1'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; GRANT ALL ON *.* TO 'dev_1'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION; FLUSH PRIVILEGES;"
Then when you start the container you must publish the port number like so:
docker run -t -d -p 4406:3306 ubuntu_16_04_lemp_php_7_2:latest
If your container stops prematurely, then you might want to add a CMD line in your docker file to run a start.sh script and within that script you might want to add something like this:
# stupid hack to keep container from being stopped
tail -f /dev/null
Finally, to connect to your DB instance on your local MacOS machine with an app like Sequel Pro for example, use the following credentials:
Host: 0.0.0.0
Username: dev_1
Password: <dev_1_password>
Port: 4406
If you don't like to use port 4406, try 3307, 3308, 3309.
github
forum
howto
example
troubleshoot
mysql
server
docker
host
connection
issue
sequel
pro
mariadb
client
hostname
docker-machine
ip
address
ipaddress
guide
reference
toread
tolearn
totry
tounderstand
image
port
detached
database
credentials
1) Within the container: change in /etc/mysql/mysql.conf.d/mysqld.cnf the bind-address option from 127.0.0.1 to 0.0.0.0
2) Restart MySQL server (note that whenever you start MySQL you must use this command in the Dockerfile:
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf
RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start
That is, you must touch the files in /var/lib/mysql and then start the server with service command and not systemctl.
Next, create a user separate from root e.g. dev_1, in MySQL and given them privileges to their '0.0.0.0' and '%' hosts. Like this in the Dockerfile:
RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start && mysql -uroot -proot mysql -e "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; CREATE USER 'dev_1'@'0.0.0.0' IDENTIFIED BY 'secret'; GRANT ALL ON *.* TO 'dev_1'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION; GRANT ALL ON *.* TO 'dev_1'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION; FLUSH PRIVILEGES;"
Then when you start the container you must publish the port number like so:
docker run -t -d -p 4406:3306 ubuntu_16_04_lemp_php_7_2:latest
If your container stops prematurely, then you might want to add a CMD line in your docker file to run a start.sh script and within that script you might want to add something like this:
# stupid hack to keep container from being stopped
tail -f /dev/null
Finally, to connect to your DB instance on your local MacOS machine with an app like Sequel Pro for example, use the following credentials:
Host: 0.0.0.0
Username: dev_1
Password: <dev_1_password>
Port: 4406
If you don't like to use port 4406, try 3307, 3308, 3309.
october 2018 by racl101
Working with Engines and Connections — SQLAlchemy 1.2 Documentation
september 2018 by racl101
This gives a very simple way of getting started with SQLAlchemy.
sqlalchemy
documentation
guide
reference
connections
engine
database
query
gettingstarted
howto
example
python
python2.7
september 2018 by racl101
SQLAlchemy Documentation — SQLAlchemy 1.2 Documentation
september 2018 by racl101
Seems that the key to learning to work with databases in Python requires understanding SQL Alchemy.
documentation
guide
reference
sqlalchemy
python
database
toolkit
driver
orm
relational
engine
mysql
sqlite3
tutorial
howto
example
resource
september 2018 by racl101
php - belongsToMany relationship in Laravel across multiple databases - Stack Overflow
may 2018 by racl101
Someone figured out how to do a relationship column / property between two models (with pivot table), i.e. belongsToMany where the second model might have a dynamic database connection (i.e. it's not the same each time a query is done). So they figured out howto obtain the database for the current database connection (i.e. the current PHP script execution).
stackoverflow
laravel
laravel5
howto
belongstomany
model
relationship
property
column
between
different
database
connections
example
guide
reference
pivot
table
may 2018 by racl101
Update Amazon RDS max_connections with Parameter Group · Issue #16 · jollygoodcode/jollygoodcode.github.io
april 2018 by racl101
This thread discussion might provide some insight into manually increasing the mysql max_connections option / setting manually and overriding Amazon's AWS "sensible" defaults.
github
forum
aws
amazon
howto
override
change
mysql
database
db
option
variable
max_connections
setting
totry
example
guide
reference
april 2018 by racl101
mysql - value of max_connections in AWS RDS - Stack Overflow
april 2018 by racl101
This might be a potential way to increase max_connections in AWS RDS instances
stackoverflow
mysql
aws
rds
database
instances
max_connection
variable
tocheckout
totry
tolearn
tounderstand
april 2018 by racl101
Welcome to PyMySQL’s documentation! — PyMySQL 0.7.2 documentation
march 2018 by racl101
The documentation is kind of sparse, but it has some good reference links. That's where the meat is.
python
library
pymysql
module
database
mysql
query
api
guide
reference
documentation
march 2018 by racl101
PEP 249 -- Python Database API Specification v2.0 | Python.org
march 2018 by racl101
This tutorial explains the API of the results returned by queries made with the PyMySQL module as well as explaining what cursor objects are. Need to really read and learn this if I hope to be able to write data processing scripts that query MySQL databases in Python.
python
database
api
documentation
guide
reference
tutorial
cursor
pymysql
connection
objects
march 2018 by racl101
How to Tell if Your PHP Site has been Hacked or Compromised | Greg Freeman's Blog
march 2018 by racl101
Need to read and understand this.
blog
tutorial
security
inspect
check
php
hacked
compromised
obfuscate
code
suspicious
mysql
database
find
grep
explanation
toread
tolearn
totry
tounderstand
imporant
march 2018 by racl101
Pass the database pwd to Rails with an environment variable (Example)
january 2018 by racl101
Need to learn to figure this out.
blog
tutorial
toread
tolearn
tounderstand
totry
howto
example
password
database
rails
server
environment
variable
january 2018 by racl101
ulimit - Ubuntu 16.04 Server MySql open_file_limit won't go higher than 65536 - Server Fault
november 2017 by racl101
Really good example to follow in case increasing max_connections and increasing limits in /etc/security/limits.conf doesn't work.
serverfault
stackexchange
howto
create
mysql
service
override
configuration
file
increase
maximum
open
limit
database
server
example
guide
reference
ubuntu
ubuntu16.04
linux
november 2017 by racl101
MySQL values open_files_limit and max_connections are not applied – Plesk Help Center
blog tutorial howto troubleshoot fix increase mysql maximum max connections database server configuration linux debian ubuntu example guide reference hard soft limits number open files file handles open_files_limit max_connections
november 2017 by racl101
blog tutorial howto troubleshoot fix increase mysql maximum max connections database server configuration linux debian ubuntu example guide reference hard soft limits number open files file handles open_files_limit max_connections
november 2017 by racl101
PyMySQL/PyMySQL: Pure Python MySQL Client
october 2017 by racl101
Need to look into this.
github
pymysql
python
mysql
database
driver
library
totry
tolearn
tounderstand
project
october 2017 by racl101
Copy this bookmark: