Thursday, May 17, 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

    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;

          No comments:

          Post a Comment