RSS

Install Mysql 5.5 ubuntu server 16

  1. Uninstall any existing version of MySQL
    sudo rm /var/lib/mysql/ -R
  2. Delete the MySQL profile
    sudo rm /etc/mysql/ -R
  3. Automatically uninstall mysql
    sudo apt-get autoremove mysql* --purge
    sudo apt-get remove apparmor
  4. Download version 5.5.51 from MySQL site
    wget https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz
  5. Add mysql user group
    sudo groupadd mysql
  6. Add mysql (not the current user) to mysql user group
    sudo useradd -g mysql mysql
  7. Extract  to /usr/local
    sudo tar -xvf mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz /usr/local/
  8. Create mysql folder in /usr/local by moving the untarred folder
    cd /usr/local
    sudo mv mysql-5.5.49-linux2.6-x86_64 mysql
  9. Set mysql directory owner and user group
    cd mysql
    sudo chown -R mysql:mysql *
  10. Install the required lib package (works with 5.6 as well)
    sudo apt-get install libaio1
  11. jika gagal : sudo apt-get install libncurses5
  12. Execute mysql installation script
    sudo scripts/mysql_install_db --user=mysql
  13. Set mysql directory owner from outside the mysql directory
    sudo chown -R root .
  14. Set data directory owner from inside mysql directory
    sudo chown -R mysql data
  15. Copy the mysql configuration file
    sudo cp support-files/my-medium.cnf /etc/my.cnf (mysql 5.5)
    sudo cp support-files/my-default.cnf /etc/my.cnf (mysl 5.6)
  16. Start mysql
    sudo bin/mysqld_safe --user=mysql &
    sudo cp support-files/mysql.server /etc/init.d/mysql.server
  17. Initialize root user password
    sudo bin/mysqladmin -u root password '[your new password]'
  18. Add mysql path to the system
    sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
  19. Reboot!
  20. Start mysql server
    sudo /etc/init.d/mysql.server start
    
  21. Stop mysql server
    sudo /etc/init.d/mysql.server stop
  22. Check status of mysql
    sudo /etc/init.d/mysql.server status
  23. Enable myql on startup
    sudo update-rc.d -f mysql.server defaults

    Disable mysql on startup (Optional)

    sudo update-rc.d -f mysql.server remove
  24. REBOOT!
  25. Now directly use the command below to start mysql if it hasn’t
    sudo service start mysql -u root -p
  26. Tambahan config my.cnf
  27. bind-address = 11.11.100.5
    log_bin_trust_function_creators = 1
    event_scheduler = ON
  28. tambahan => apt install php7.0-cli
  29. deb http://old-releases.ubuntu.com/ubuntu yakkety main restricted universe multiverse
    deb http://old-releases.ubuntu.com/ubuntu yakkety-updates main restricted universe multiverse
    deb http://old-releases.ubuntu.com/ubuntu yakkety-security main restricted universe multiverse

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Posting Komentar