MySQL 8 Setup on Ubuntu


  1. Download the deb file
  2. go to the location where the file was downloaded and run the below command
  3. sudo apt-get install ./<file_name>
  4. run update to get the latest mysql version
  5. sudo apt-get update
  6. install mysql
  7. sudo apt-get install mysql-server
  8. you will be asked to set a root password - set something there.
  9. select ok for most of the options as the defaults are good. 
  10. you are good to go

Setup Access to root

  1. you will not be able to access the db using mysql -u root -p with the password you set during installation. 
  2. run sudo mysql_secure_installation to setup the db correctly
    1. set validate password plugin as false
    2. set the root password to something you can remember
    3. set anon uses as false
    4. set remote access to true / false based on where you want to use it. 
  3. set mysql to be accessed by root with a password
    1. acess using sudo mysql and run the below commands
      1. use mysql;
      2. UPDATE user SET plugin='mysql_native_password' WHERE User='root';
      3. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'passw0rd';
      5. exit
  4. you should now be able to access the db by calling mysql -u root -p


Popular posts from this blog

Acer Chromebook 14 CB3-431 ChromeOS removal

Chromebook xfce volume controls

Closing accounts I do not use turns intresting