Thursday, May 24, 2018

phpmyAdmin and MySQL Server

This happened to me, when I installed mysql-server then install phpmyadmin, I face this problem when accessing the address localhost/phpmyadmin: "mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'" and "#1698 - Access denied for user 'root'@'localhost'"

this happened because the new configuration of mysql-server and phpmyadmin, for security reason, do not allow root user to access remotely by default.

try this steps:

  1. configure the mysql-server, add a new user "pma" (phpMyAdmin) or "pmauser"
    1. login to your mysql console using terminal:
      mysql -u root -p
    2. insert your root password
    3. execute this commmand, change the 'yourpassword' to preferred one:
      Create user 'pmauser'@'%' identified by 'yourpassword';
    4. make sure that your new user had been created:
      select host, user, authentication_string from mysql.user;
    5. grant privilege to your new user, be aware that this command grants pmauser as superuser as root have: GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'%';


  2. configure the phpmyadmin config to use the created user
    1. go to /etc/phpmyadmin
      1. cd /etc/phpmyadmin
    2. edit the config-db.php file
      1. sudo gedit config-db.php
      2. edit the user (pma/pmauser) and password as we created before
      3. save the file


  3. refresh the page and login





Thursday, May 17, 2018

Totally uninstall and remove configuration MySQL Server Ubuntu 18.04

When you uninstall MySQL for any purpose and reinstall the MySQL Server, perhaps you want to fresh install for all the configuration, but you found that the configuration still remains.

Try this lists accordingly:

sudo service mysql stop  #or mysqld
sudo killall -9 mysql
sudo killall -9 mysqld
sudo apt-get remove --purge mysql-server mysql-client mysql-common

sudo deluser -f mysql
sudo rm -rf /var/lib/mysql
sudo apt-get purge mysql-server-core-5.7
sudo apt-get purge mysql-client-core-5.7
sudo rm -rf /var/log/mysql
sudo rm -rf /etc/mysql

sudo apt-get autoremove
sudo apt-get autoclean

Install MySQL Server on Ubuntu 18.04



In case we need to install mysql server on ubuntu (18.04 LTS used as case), follow the instruction
  1. Install MySQL Server
    • sudo apt-get update
    • sudo apt-get install mysql-server

    1. Allow the remote access
      • sudo ufw allow mysql

      1. Start MySQL Server
        • sudo systemctl start mysql

        1. Set MySQL to launch at reboot
          • sudo systemctl enable mysql

          1. Set MySQL password
            • sudo /usr/bin/mysql -u root -p
            • mysql> use mysql;
            • mysql> UPDATE user SET authentication_string=PASSWORD('yourpassword') WHERE User='root';
            • mysql> FLUSH PRIVILEGES;

          Tuesday, January 29, 2013

          FirewallD is not running

          Error ini akan muncul saat kita akan melakukan instalasi printer jaringan pada Ubuntu
          FirewallD is not running. Network printer detection needs services mdns, ipp, ipp-client and samba client enabled on firewall.
          Untuk menyelesaikan masalah ini, melalui Terminal ketikkan:
          sudo system-config-printer


          LibreOffice Impress Slide Pane can not re-dock

          Untuk pengguna LibreOffice Impress, ada sedikit kesulitan saat kesalahan meng-undock slide pane (panel slide: list slide), tidak dapat dikembalikan ke tempatnya semula (re-dock)

          Untuk mengembalikan slide pane ke semula, ketik ctrl-shift-F10,
          atau tekan ctrl sambil men-double-klik area kosong bagian atas slide pane

          Use ctrl-shift-F10 to re-dock your slide pane on Libre Office Impress,
          or push ctrl while you double-click the blank area above your slide list at slide pane (see mouse pointer on below image)

          Friday, June 1, 2012

          Management Asterisk VOIP PABX

          when you connect to your installed Asterisk VOIP PABX, use this connection as default:

          • user: root
          • pass: astlinux
          to add new client:
          1. goto /etc/asterisk
          2. add new client:
            1. type: vi /etc/asterisk/sip.conf
            2. to know about references about editing using vi, visit http://www.ungerhu.com/jxh/vi.html
            3. edit the sip.conf, for adding new client:
              • give new caller id as sample :
                • [123]               --> the client name
                • type=friend     --> this client can use the PABX
                • username=123
                • secret=123      --> the password
                • host=dynamic
              • save the sip.conf
          3. add new extension for PABX
            1. type: vi /etc/asterisk/extensions.conf
            2. edit the extensions.conf, follow the last exten noticed there
          to use the client:
          1. install the VoIP client
          2. add the asterisk IP address as gateway

          Sunday, May 27, 2012

          Moving VirtualBox Files to Other Computer/Folder

          to move a virtual box file to other folder or computer:

          1. find out your virtual box media using:
            1. on virtual box: click File - Media Manager
            2. you'll find list of (virtual) hardisks used
            3. click the (virtual) hardisk that you want to move
            4. look at the bottom, note the location of the file
          2. copy your file
            1. copy/cut virtual box file (file with extension .vdi)
            2. paste the file in new folder
          3. set virtual box to open the new location
            1. open virtual box application
            2. click on File - Virtual Media Manager, look at the Hardisk tab
            3. if the recent hardisk still exists:
              1. right click on the list you want to change the destination
              2. click release, answer 'YES' for the confirmation
            4. click 'ADD'
            5. locate to your .vdi file in your new location
            6. exit virtual media manager
            7. add your virtual machine
              1. in the main display of VirtualBox, click Machine - New
              2. click 'NEXT' when welcome screen displayed
              3. name your new virtual machine, you can type anything here, and will be displayed on list of virtual machine
              4. choose the OS Type and Version related
              5. adjust the virtual memory
              6. click 'Use existing hardisk', choose your virtual hardisk that has been set in step 3.5
              7. click Finish
          4. That's all, you can use your virtual machine now

          Friday, May 25, 2012

          PHPMyAdmin: Cannot start session without errors

          sometimes we found this error when logging into PHP MyAdmin:
          "Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly."


          this because the sessions folder has been removed or restricted, do this steps:
          1. check whether the folder /var/lib/php/sessions exists
          2. if exists, then you need to run sudo chmod 0777 /var/lib/php/sessions from terminal
          3. if the folder doesn't exist, then you need to create the folder manually:
              - cd /var/lib
              - sudo mkdir php
              - sudo chmod 0777 php
              - sudo mkdir sessions
              - sudo chmod 0777 sessions


          then try to login via PHP MyAdmin again

          VirtualBox can’t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).

          when we start our virtual machine on VirtualBox VMs, if we found this error message:
          VirtualBox can’t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE)


          do this steps from terminal:
          1. sudo lsmod |grep kvm
          2. sudo modprobe -r kvm_intel


          check whether your virtual machine has normally function


          Thursday, December 22, 2011

          Install eclipse SDK 3.7.1 on Ubuntu

          arranged by Oman (from http://www.if-not-true-then-false.com/2010/linux-install-eclipse-on-fedora-centos-red-hat-rhel/)

          adopted for Ubuntu

          - download eclipse-SDK-3.7.1-linux-gtk.tar.gz

          terminal:
          >> root mode
          sudo -i
          >> locate eclipse-SDK-3.7.1-linux-gtk.tar.gz
          >> untar SDK on /opt
          tar -xvzf eclipse-SDK-3.7.1-linux-gtk.tar.gz -C /opt
          >> add permission for /opt/eclipse
          chmod -R +r /opt/eclipse
          >> create executable file
          touch /usr/bin/eclipse
          chmod 755 /usr/bin/eclipse
          nano -w /usr/bin/eclipse
          >> add following to file
          #!/bin/sh
          export ECLIPSE_HOME="/opt/eclipse"
          $ECLIPSE_HOME/eclipse $*
          >> create shortcut
          >> open shortcut
          gedit /usr/share/applications/eclipse.desktop
          >> add/replace the existing with following
          [Desktop Entry]
          Encoding=UTF-8
          Name=Eclipse
          Comment=Eclipse SDK 3.7.1
          Exec=eclipse
          Icon=/opt/eclipse/icon.xpm
          Terminal=false
          Type=Application
          Categories=GNOME;Application;Development;
          StartupNotify=true

          >> call from commandline: eclipse
          >> or from desktop shortcut

          Friday, October 21, 2011

          Instalasi Webserver di Ubuntu

          melalui terminal, ketik
          sudo apt-get install lamp-server^


          kemungkinan Anda akan menemukan masalah:
          E: Unable to locate package lamp-server

          hal ini dikarenakan kurang lengkap menuliskannya, perhatikan ada tanda topi (^) di ujung, jadi pengetikannya harus lengkap dengan tanda topi:
          sudo apt-get install lamp-server^ (DENGAN ^)

          -ok-