Rabu, 16 Mei 2018

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

  2. Allow the remote access
    • sudo ufw allow mysql

  3. Start MySQL Server
    • sudo systemctl start mysql

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

  5. 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;

Tidak ada komentar: