Skip to main content

Posts

Showing posts from February 15, 2018

How to enable remote admin access to MySQL database server?

Follow instructions below: Login to Plesk and make sure that  Allow remote connections from any host option  is enabled in  Tools & Settings > Database Servers > Settings Edit  my.cnf/my.ini  file changing  bind-address  parameter to: bind-address = 0.0.0.0 Also, make that  skip-networking  parameter is not defined. For Linux: /etc/mysql/my.cnf  Debian/Ubuntu /etc/my.cnf  CentOS/CloudLinux/RHEL For Windows: "%plesk_dir%\MySQL\my.ini"  for Plesk databases(port 8306) "%plesk_dir%\Databases\MySQL\my.ini"  for Clients databases(port 3306) After that, restart MySQL server. Login to MySQL server. Note : For the access to client's MySQL server on Windows, use PHPMyAdmin:  Plesk > Tools & Settings > Database Servers - MySQL DB Admin. Grant the access to remote IP address and login to MySQL. For example, if you want to allow access to database called  database  for user  user  with password  password  and remote IP add

How to use Django's Proxy Models

Modeling custom behavior without touching the database While proxy models aren't the most critical feature in the Django framework, they do seem to get short shrift. Here's a look into how to use this feature to create new and clean interfaces to data without making changes to your database. Django’s proxy models are one of those features that I remember reading about and thinking, “oh, cool… I guess” and then moving along. From time to time, they do come in very handy, but there’s not that much written about how to best make use of them What are they? A proxy model is just another class that provides a different interface for the same underlying database model. That’s it. Really. A proxy model is a subclass of a database-table defining model. Typically creating a subclass of a model results in a new database table with a reference back to the original model’s table - multi-table inheritance. A proxy model doesn’t get its own database table. Instead it operates on