Thursday, July 14, 2016

Configure your .com website on Apache Server

If you want to run your website from an Apache2 server and make it available from, you can follow these steps:

1) Go to /var/www/ and copy the root directory of yourproject (or clone the repository from Git).
2) Create a new file on /etc/apache2/sites-available/ named with this content:
    <VirtualHost *:80>
        DocumentRoot "/var/www/yourproject"
3) Activate the website with the command: sudo a2ensite
4) Find your public IP with the command: sudo ifconfig (it should appear as innet_addr)
5) From your domain management site, edit the A DNS record for '@', pointing now to your public IP address
6) From your domain management site, edit the CNAME DNS record for 'www', pointing now too '@'
7) Wait a couple of hours until the DNS changes are propagated. Your website should be available from and

Monday, July 11, 2016

How to allow MySQL remote connections

If you have a MySQL database running on your server, and you want it to accept remote connections, you have to follow these steps:

1) Allow MySQL to listen to all interfaces (default is the loopback interface only):

sudo vim /etc/mysql/my.cnf
You replace this statement:
bind-address            =
by this one:
bind-address            =

2) Create a new database use with all privileges granted (you shouldn't allow remote connections with the root user):

mysql -u root -p -h
mysql> CREATE USER 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost' WITH GRANT OPTION;
mysql> CREATE USER 'yourusername'@'%' IDENTIFIED BY 'yourpassword';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'%' WITH GRANT OPTION;

3) Test the connection from a different network (make sure you don't have any proxy limitations):

mysql -u yourusername -p -h your.server.address

Sunday, July 10, 2016

Big Data and Ethics

Big Data is not precisely a new trend, but the latest advances in computing capacity have set the stage for its rise. The hype and the reality of these new developments raise ethical issues that demand deliberation.

I came across an interesting white paper titled Perspectives of Big Data, Ethics, and Society, by the Council for Big Data, Ethics, and Society, that raises concerns about the obsolescence of the Common Rule (rule of ethics regarding research involving human subjects).

The Common Rule assumes that research methods using existing public datasets have no risk to individual human subjects. However, new data science techniques can create composite pictures of persons from different datasets that might be innocuous on their own but produce highly sensitive personal insights when combined. Since the informed consent occurs at the point of collection, before any data is used, it is not always possible to explain to the subject all the risks that the uses of his data might have with the current and future data analytics techniques.

In addition, the Common Rule protects individuals but it doesn't track the harms affecting communities when data is aggregated.

The Council offers the following recommendations:
  • Ensure the Common Rule clearly addresses regulation of data science. Ethics regulations should focus on what will be or could be done with datasets.
  • Seek ways to facilitate new approaches to ethics review inside academia and industry. Try new approaches that consider potential group harms in addition to individual harms.
  • Develop mechanism of ethical assessment calibrated to the practices of big data. Expand the analysis of the ethical implications of a system throughout the entire development and usage lifecycle (which is typically different in industry and academia).
  • Create and distribute high quality data ethics case studies that address difficulties faced by data scientists and practitioners. Case studies are a valuable pedagogical resource because they facilitate collaborative discussion.
  • Develop and support data science curricula with integrative approaches to ethics education. Ethics needs to be a cornerstone of big data education.
  • Strengthen ethics-oriented activities within professional associations. Ensure ethical commitments in research and practice at the professional association level.
  • Create hybrid spaces for ethics engagement. Treat networking and collaboration as necessary components of establishing ethics capacity.
  • Build models of internal and external ethics regulation bodies in industry. Without internal, external or legal repercussions, voluntary ethics review mechanisms could be difficult to enforce.
  • Set standards for responsible cross-sector data sharing. 
In this white paper the authors identify some challenging questions for future work, such as how to account for the risk of sharing datasets when we cannot know what auxiliary datasets they will be combined with in the future.