For the sake of uniformity and smooth experience, you can install MySQL using Containers.
Install Docker Engine:
<aside>
💡 Use sudo
after this point if you are having authentication errors
</aside>
<aside>
💡 If you don't want to add sudo
before every instruction head to this tutorial.
</aside>
Install MySQL Server Docker Image
docker pull ubuntu/mysql
To start a new Docker container for a MySQL Server
docker run --name=<container_name> -p 30306:3306 -e MYSQL_ROOT_PASSWORD=<password> --restart on-failure -d ubuntu/mysql
You can access the MySQL server at localhost:30306
<aside> 🙂 YOU ARE SUPPOSED TO REPLACE THE PART WRITTEN IN ANGULAR BRACKETS. FOR EXAMPLE: Replace <password> with the password you want.
</aside>
Now you can use the mysql
client with the MySQL Server container.
docker exec -it <container_name> mysql -uroot -p