Friday, May 26, 2017

How to allow remote connection to mysql

By default, In MySQL, remote access is disabled. 
First, execute below SQL command to enable all the privileges. Here, I'm using "root" as the user and "abc123" as the password.
 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'abc123' WITH GRANT OPTION;
 FLUSH PRIVILEGES;
Then open /etc/mysql/my.cnf from  Unix/OSX systems. If it's a Windows system, you can find it in the MySQL installation directory, usually, something like C:\Program Files\MySQL\MySQL Server 5.5\ and the filename will be my.ini

And then find the following line from my.inf and comment out .
Change line
 bind-address = 127.0.0.1
to
 #bind-address = 127.0.0.1
Then, restart MYSQL server for the changes to take effect.

Tuesday, February 28, 2017

How to block the login for the Management Console of WSO2 IoT Server

Put the following config to <IoTS_HOME>/core/repository/conf/tomcat/carbon/WEB-INF/web.xml.


<security-constraint>
    <display-name>Restrict direct access to certain folders</display-name>
    <web-resource-collection>
        <web-resource-name>Restricted folders</web-resource-name>
        <url-pattern>/carbon/*</url-pattern>
    </web-resource-collection>
    <auth-constraint />
</security-constraint>

Then restart the server.


Wednesday, January 18, 2017

[WSO2 IoT] How to Self-unsubscribe from Mobile Apps.

In default WSO2 IoT server, you can't uninstall mobile apps from the apps store. But, you can self-unsubscribe from mobile apps by changing a config. For that, you have to set "EnableSelfUnsubscriptionas true in <IoT_HOME>/core/repository/conf/app-manager.xml


        <Config name="EnableSelfUnsubscription">true</Config>

Then, restart the server.

Login to store and click on "My Apps" tab. Click on the button (with 3 dots) in the bottom right corner of the app and click on "Uninstall".


That's all. :)