SQL Environment Setup to Learn SQL | MySQL Server Installation

SQL Environment Setup to Learn SQL | MySQL Server Installation

In this tutorial, I will show you step by step how to download and install necessary software for learning and practicing SQL programming in your system. I will show you how to do it in Ubuntu and Windows.

Download and install MySQL server

MySQL server stores databases and execute SQL queries. You will not be able to create databases and run SQL queries without MySQL server.

Install MySQL server on windows

MySQL comes in two different editions: Enterprise and Community. MySQL Community edition is open source database. You are free to download and install it to learn SQL.

Step 1: Visit download MySQL community server page on MySQL website

Step 2: Scroll down to the page and select the appropriate option for your operating system. MySQL community server is available for all major operating system (see the image given below).

MySQL Community Server Download Options
MySQL Community Server Download Options

Optionally, you can also install MySQL community server on ubuntu via command line

apt-get install -y mysql-server

Download the appropriate version for your operating system and install as usual. At the time of installation, MySQL server will ask you to set the password for root user.
Important: Set a password and remember it.

Open the command prompt on windows or terminal in Linux operating systems once MySQL community server is installed. Run the following command.


if you see this error, then MySQL community server is installed.

ERROR 1045 (28000): Access denied for user 'username'@'localhost' (using password: NO)

You can access MySQL server with this command.

mysql -uroot -p

Terminal will prompt you to write password for root user. Enter the password. You will see screen like this after entering the password.

MySQL terminal
MySQL terminal

Now you can run SQL queries here. Use quit command to get out of the MySQL server.

Your system is now ready to accept SQL command but we don’t want to work on command-prompt. We will use an IDE known as MySQL Workbench.

Step 1: Download MySQL workbench for your operating system and install it as usual.

Step 2: Open MySQL workbench and go to [Database] menu and select [Connect to Database] menu item. A dialog box will appear where you can fill information about MySQL server.

MySQL server connection
MySQL server connection

Click on [Store in Keychain] button and enter the MySQL server password that you set at the time of MySQL server installation.

If workbench is connected to MySQL server it will show a screen like this:

MySQL Workbench Connected to Database
MySQL Workbench Connected to Database

Congratulations! now your system is ready to learn SQL. Let me know in the comment if you face any problem in setting up MySQL server or MySQL workbench in your system. We will bring more tutorials for you to learn SQL.

Dr. Yogendra Pal

Ph.D. (IIT Bombay), M.Tech., B.Tech. (CSE) Dr. Yogendra Pal finished his Ph.D. from Educational Technology department at IIT Bombay. Mr. Pal holds B.Tech. and M.Tech. Degrees in Computer Science and Engineering. His interests include programming, web development, graphic design and educational technology.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu


Close Panel
Skip to toolbar