Tuesday, August 7, 2018

How to allow remote connection to mysql

  No comments
August 07, 2018

What is disabled by default is remote root access. If you want to enable that, run this SQL command locally:


 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
 FLUSH PRIVILEGES;

And then find the following line and comment it out in your my.cnf file, which usually lives on /etc/mysql/my.cnf on Unix/OSX systems. In some cases the location for the file is /etc/mysql/mysql.conf.d/mysqld.cnf).


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.


Change line


 bind-address = 127.0.0.1

to


 #bind-address = 127.0.0.1

And restart the MySQL server (Unix/OSX, and Windows) for the changes to take effect.


if this not working. check the 3306 port.


sudo ufw status


run this command to enable port



sudo ufw allow 3306



restart mysql

Read More

Monday, July 9, 2018

How to enable and disable gatekeeper on mac

  No comments
July 09, 2018

How to enable and disable gatekeeper on mac. Gatekeeper is a security feature of the macOS operating system by Apple. You can see this setting on system preferences in Security & Privacy. But on mac OS sierra, this feature is hidden by apple.




You can enable "Anywhere option" with command on terminal. just type this command.

sudo spctl --master-disable

to hidden you can do again.

sudo spctl --master-enable

Read More

Thursday, May 17, 2018

Check Duplicate Data on Google Spreadsheet

  No comments
May 17, 2018


How to check duplicate data on Google Spreadsheet. You can do it this step.


  1. Select Column
  2. Choose Format - Conditional Formating
  3. in Conditional Formating Choose formula cell if custom 
  4. put the code
    =countif(A:A,A1)>1
  5. A is column A, you can change the column
  6. and the duplicate data will be highlight with color you choose

Read More

Wednesday, May 16, 2018

How to remove permanently a path from the fish $PATH

  No comments
May 16, 2018

How to remove permanently a path from the fish $PATH. There is also $fish_user_paths, which is a universal variable (meaning it carries the same value across fish sessions and is synchronized across them). On startup and whenever fish_user_paths is modified, fish adds it to $PATH. If the offending directory is added here, execute set -e fish_user_paths[index] once (e.g. in an interactive session).
set -e fish_user_paths would remove the entire variable (while set -U fish_user_pathswould clear it) which would also work but would also remove all other paths.
just type on your terminal
set -e fish_user_paths
set -U fish_user_paths
Close your terminal and open again. that clear another path

Read More

Tuesday, May 15, 2018

How to set $PATH permanently in fish shell

  No comments
May 15, 2018

How to set $PATH permanently fish shell.

  1. type this in your terminal
    vim ~/.config/fish/config.fish
    
  2. add this code to fish config

    
    set --universal fish_user_paths $fish_user_paths ~/path/name/here
    
    
  3. restart terminal type your bin


Read More

Tuesday, February 6, 2018

How to Add Second HDD to Samba Ubuntu

  1 comment
February 06, 2018

At this time I will share how to Add Second HDD (Harddrive) to Samba, after your plug your HDD to PC.



1. Create directory for mounting HDD, i create on folder media and create folder MM002 for mounting HDD
$ cd to /media/{username}
$ sudo mkdir MM002
$ sudo chmod 777 MM002
$ sudo chown nobody:nogroup MM002
2. Cek your HDD with command 

$ sudo fdisk -l

3. make your hdd to be ext4 linux system with command
$ sudo mkfs.ext4 /dev/sda

4. Cek your HDD UUID, and edit fstab with nano or your text editor, i use sublime text editor
$ sudo mkfs.ext4 /dev/sda$ sudo nano /etc/fstab
or
$ sudo subl /etc/fstab

5. Add new line for your HDD new mounting

6. remounting your HDD and cek
$ sudo mount -a
$ df -h

7. You can double check in disk tool -> klik HHD -> klik gear icon.

8. Now we add HDD name to samba config
$ sudo subl /etc/samba/smb.conf

9. restart samba and restart ubuntu
$ sudo subl /etc/samba/smb.conf

10. done you can access new HDD with samba
 

Read More

Wednesday, December 20, 2017

Setup VPN PPTP on Ubuntu Server

  No comments
December 20, 2017

Because of the need for public static IP Address usage for connection to the japanese and ISP servers I use using dynamic IP. I am trying to create a vpn server digital ocean and get static ip for registering on japanese server whitelist. the use of this vpn can also be used to open sites that are blocked by isp. i will give a tutorial How to setup PPTP VPN on ubuntu server.

  1. Login root SSH to your server and install some package
    $ apt-get install ppp pptpd iptables
  2. configuration of PPTP IP ranges in server.
    $ vim /etc/pptpd.conf
  3. Then remove the '#' in the configuration file on the following line:
    #localip 192.168.0.1
    #remoteip 192.168.0.234-238,192.168.0.245
    to
    localip 192.168.0.1
    remoteip 192.168.0.234-238,192.168.0.245
  4. Configuration DNS Server
    $ vim /etc/ppp/pptpd-options
    find 'ms-dns' and change to
    ms-dns 8.8.8.8
    ms-dns 8.8.4.4
  5. Create Account
    $ vim /etc/ppp/chap-secrets
    add new line and create account like this
    # client    server  secret      IP addresses
    izor        pptpd   asd1234     *
  6. Configure NAT for PPTP connections, otherwise we can not connect to any of these servers
    $ vim /etc/rc.local
    add before line exit 0
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && iptables-save
  7. Aktifkan IPv4 forwarding
    $ vim /etc/sysctl.conf
    uncomment or remove the #
    net.ipv4.ip_forward=1
  8. Reload konfigurasi
    $ sysctl -p
  9. Reboot your server and run this command
    $ service pptpd start
  10. Now you can setup your PC client to connect the VPN PPTP

Read More