Upgrade mysql 5.5 to 5.6 ubuntu 14.04

Standard

step 1 : take a backup

mysqldump –lock-all-tables -u root -p –all-databases > dump.sql

step 2 : remove old mysql

sudo apt-get remove mysql-server
sudo apt-get autoremove

step 3 : install new version of mysql

sudo apt-get install mysql-client-5.6 mysql-client-core-5.6

sudo apt-get install mysql-server-5.6

step 4 : restore your data

mysql -u root -p < dump.sql

How To See Crontab

Standard

You can create a cron.log file to contain just the CRON entries that show up in syslog. Note that CRON jobs will still show up in syslog if you follow the following directions.

Open the file

/etc/rsyslog.d/50-default.conf

Find the line that starts with:

#cron.*

uncomment that line, save the file, and restart rsyslog:

sudo service rsyslog restart

You should now see a cron log file here:

/var/log/cron.log

Cron activity will now be logged to this file (in addition to syslog).

Note that in cron.log you will see entries for when cron ran scripts in /etc/cron.hourly, cron.daily, etc. – e.g. something like:

Apr 12 14:17:01 cd CRON[14368]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

However, you will not see more information about what scripts were actually ran inside /etc/cron.daily or /etc/cron.hourly, unless those scripts direct output to the cron.log (or perhaps to some other log file).

If you want to verify if a crontab is running and not have to search for it in cron.log or syslog, create a crontab that redirects output to a log file of your choice – something like:

01 14 * * * /home/joe/myscript >> /home/log/myscript.log 2>&1

This will redirect all standard output and errors that may be produced by the script that is run to the log file specified.

link -> http://askubuntu.com/questions/56683/where-is-the-cron-crontab-log

How To Restore MongoDB

Standard

Mongo db is raw data, so it’s different with mysql .

Restore mongoDb data is simple to restore it:

– mongorestore –db {name your mongodb}  {your dump path db like ~/mike/mongodb/dump/}

BackUp :

– First stop the process mongodb, On ubuntu you can type sudo service mongodb stop

– After stop process create folder you want to backup

– cd {your folder}

– mongodb –db {your mongodbname}

Referensi: http://www.thegeekstuff.com/2013/09/mongodump-mongorestore/

Mysql adding user for remote access

Standard

IN order to connect remotely you have to have MySQL bind port: 3306 to your machines IP in my.cnf. Then you have to have created the user in both localhost and ‘%’ wildcard and grant permissions on all DB’s as such . See below:

my.cnf

#Replace xxx with your IP Address 
bind-address        = xxx.xxx.xxx.xxx

then

CREATEUSER'myuser'@'localhost' IDENTIFIED BY'mypass';CREATEUSER'myuser'@'%' IDENTIFIED BY'mypass';

Then

GRANTALLON*.*TO'myuser'@'localhost';GRANTALLON*.*TO'myuser'@'%';

Depending on your OS you may have to open port 3306 to allow remote connections.

Referensi link -> http://stackoverflow.com/questions/16287559/mysql-adding-user-for-remote-access

SQL Server On Ubuntu

Standard

Inspect Server Settings

There are three significant aspects that users may neglect, which lead to the failure of the connection to the SQL Server.

Enable TCP/IP Connection

To check whether your server enabled to TCP/IP connections:

Continue reading

Belajar CPA

Standard

Apa itu CPA ?

CPA kependekan dari Cost Per Action. ketika visitor melakukan action. Actionnya bisa berupa: masukin email/kodepos , daftar ke situs target, download aplikasi, join facebook app dll. Besar jumlah $$$ yg kita dapat tergantung tingkat kesulitan dari actionnya. Nilai $$ per-action berkisar dari 0.5$ – 50$an


Komponen dalam bisnis CPA :

– The CPA Network

Network adalah organisasi yang menjembatani antara Advertiser dan Publisher (kita). Advertiser adalah pihak yg membutuhkan action. Dia yg akan membayar kita lewat Network (setelah dipotong komisi oleh Network tentunya hehe).

– CPA Offer

Network tawarkan ke publisher. Dalam contoh chat diatas , offer-nya adalah “daftar situs game online”.
Didalam sebuah offer ada requirement2 yg harus kita cermati sebelum mempromosikan. Requirementnya jg macam2 : target negara, umur minimal, jenis trafik yg boleh masuk dsb. Hati2, tidak menuruti requirement ini..resiko tidak dibayar atau banned !

CPA Offer secara umum ada 2 tipe: Continue reading

Install PINTA On UBUNTU

Standard

Installing Pinta

Pinta can be installed on Linux, Mac, Windows, or *BSD. Due to this, there are multiple ways to install Pinta based on what you are using as your operating system.

This document will show you the multiple ways to install Pinta.

Installing Pinta on Ubuntu

Install Pinta from default Ubuntu repository

Pinta is available in default Ubuntu repository. You can install it using:

  • Click on Ubuntu Software Center from Launcher (left site icon panel).
  • At the top right input box type in: Pinta and press Enter.
  • Pinta is displayed in list bellow. Click on it and click the Install button.

Continue reading