Monday, March 20, 2017

New Virtual Currency Released on March 15th 2017 (CloudCoin)

India is part of new technology e-currency consortium

On March, 15th users from all over the world will get access to new virtual currency CloudCoin. According to project participants, Cloudcoins have to become more modern and easy to use virtual currency than Bitcoin. Unlike wide known currency which was developed using cryptography methods, Cloudcoins make use of cloud technologies. Check against counterfeit for cloudcoins takes as little as 1-2 sec (for bitcoins time to write block in blockchain is about 10 min and only after writing the block your transaction is fixed and cannot be rolled back). Counterfeit check for cloudcoins is simple open API and any programmer could implement it in webpage or application. To operate with new currency user don’t have to have electronic wallet and/or any keys.

Besides that there are another principal differences between cloudcoins and cryptocurrencies. In traditional authentication systems they use one login, one password, one checking server and one database (servers and databases could have many instances for performance and scalability but logically they operate as one server and one database. In case of global counterfeit detection system RAIDA (Redundant Array of Independent Detection Agents) in order to check coin against counterfeit you have to ask 25 independent servers with 25 databases which are not being synchronized.

Wherein cloudcoins guarantee full anonymity unlike bitcoins which write down data about every transaction into blockchains where you could find the sum of the deal and the keys of deal parties. In case of cloudcoins the information is not being written down at all. So it is possible to use cloudcoins without computers or internet by printing the cloudcoin content (authentication information) on paper. You could trade with such paper money and servers will not be able to write down information about owners and transactions. So RAIDA is not a system like a public ledger which is fixing transactions but approves authenticity of money by means of servers’ responses.

If for some coin some passwords will not be approved such coin will be called “fractioned” and if the amount of such “bad” passwords is less than 8 out of 25, the coin could be “repaired” or “fixed”. Due to this mechanism the system is protected against wars, fires, floods, sudden deaths, government intervention etc. If one server with passwords database will be completely destroyed the others could approve authenticity of all existing coins.

All servers in the project are being managed by independent members of CloudCoin Consortium which could be declared as Union of server managers, software developers and marketing specialists and companies. currently there are about 30 persons - members of the Consortium. All of them have valuable amount of cloudcoins in hands. This is why they will make their best to get this new currency be with ideal reputation in order to stimulate its use and market growth.

The idea of currency with cloud authentication principles was patented in 2016 by Sean Worthington, computer science teacher from California. Project investments are not being disclosed. All funds are being spent on servers administration, software development and marketing efforts.

Ajith Narayanan
Member - CloudCoin Consortium


Tuesday, May 17, 2016

MySQL Database Replication Setup

MASTER - Omegha-erp
SLAVE      - Omegha-bcp
Database Version -   MySQL 5.5

In the MASTER server

1. Enable binary logging

root@Omegha-erp:~#sudo vi /etc/mysql/my.cnf
root@Omegha-erp:~#sudo /etc/init.d/mysql restart

2. Creation replication user account on the source database

mysql> CREATE USER 'repl'@'%' IDENTIFIED BY '*****';
mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';

3. Take backup and note the position for slave replication

mysql> flush tables with read lock;
mysql> show master status ;
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
| mysql-bin.000001 |      330 |              |                  |

$ sudo mysqldump -uroot -p*** --all-databases --master-data > dbdump.db

unlock tables;

In the SLAVE server

4. Set unique server id

root@Omegha-bcp:~#sudo vi /etc/mysql/my.cnf
server-id               = 2
root@Omegha-bcp:~#sudo /etc/init.d/mysql restart

5. Transfer backup file from the Master to Slave server

root@Omegha-bcp:~#scp -i ~/.ssh/pub-key.pem ubuntu@xx.xx.xx.xx:dbdump.db .

6. Import data

root@Omegha-bcp:~#mysql -uroot -p*** < dbdump.db

7. Point to master

mysql> change master to master_host='xx.xx.xx.xx', master_user='repl', master_password='****', master_log_file='mysql-bin.000001', master_log_pos=330;
mysql> start slave;
mysql> show slave status \G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: xx.xx.xx.xx
                  Master_User: repl
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000002
          Read_Master_Log_Pos: 267
               Relay_Log_File: mysqld-relay-bin.000004
                Relay_Log_Pos: 413
        Relay_Master_Log_File: mysql-bin.000002
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
                   Last_Errno: 0
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 267
              Relay_Log_Space: 716
              Until_Condition: None
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
               Last_SQL_Errno: 0
             Master_Server_Id: 1
1 row in set (0.01 sec)



Remote Connect to MySQL Database Using 'MySQL Query Browser'

There was a recent requirement for giving remote access to the MySQL database to our ERP consultant for him to connect from home and do the work. Our MySQL database was running on our cloud “Omegha” and was by default restricted of any remote access.
Instead of asking the consultant to use remote SSH using PuttY, we decided to go with a better GUI client for MySQL databases.

Below are the steps used for enabling remote access to the MySQL database.

Note: - Strictly not recommended for any production environment with critical data. This is a temporary requirement and will be reverted by actual security settings once the work is done.

After writing my book on “Oracle SQL Developer 4.1”  I’ve understood non-DBAs are more comfortable with GUI clients like “Oracle SQL Developer” or “MySQL Query Browser”, In fact it is true that such beautiful free tools, which normally people don’t care about make the work quite faster with its rich features.

Step-1.  Download MySQL Query Browser using this link

Note: - Please note that development of MySQL Query Browser has been discontinued. 
MySQL Workbench provides and integrated GUI environment for MySQL database design, SQL development, administration and migration. Download MySQL Workbench »

I was ok with “MySQL Query Browser” as it served my temporary purpose

Step-2.  Start the “MySQL Query Browser” once it is installed, and create a new connection to your remote MySQL Database.
Fill in the details of your database like hostname, port, username pwd etc

Step-3.  Connect to the new connection using the login screen as shown below. Her comes my first error
Note- MySQL Error Number 2003, But my ping to the server was working fine.

Step 4.  Connected to my database using PuttY and checked if I am really able to connect to the database or not. It was perfect!!!

ubuntu@Omegha-bcp:~$ mysql -uroot -p***
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
| Database           |
| information_schema |
| mysql              |
| performance_schema |
3 rows in set (0.02 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

Step 5. Opened the my.cnf file under /etc/mysql directory as root user.
ubuntu@Omegha-bcp:~$ sudo su -
sudo: unable to resolve host bcp-instance
root@bcp-instance:~# cd /etc/mysql
root@Omegha-bcp:/etc/mysql# vi my.cnf

Step6. Changed the bind-address parameter to the public IP of the machine and commented the default entry of
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address           =
bind-address            =

Step7. Restarted the mysql service
root@Omegha-bcp:/etc/mysql# service mysql restart
mysql stop/waiting
mysql start/running, process 1946

Step8. Here comes my next error when I tried connecting.
Note- MySQL Error Number 1130

Step9. Again connected to my MySQL database and granted privileges to all the host (It includes any remote hosts too, Highly not recommended for prod envs) as shown below.
root@Omegha-bcp:/etc/mysql# mysql -uroot -p***
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> grant all privileges on *.* to 'root'@'%' identified by '***';
Query OK, 0 rows affected (0.03 sec)


Step 10. Tried to make connection again using the “MySQL Query Browser” client, worked like charm J