Halloween Sale: Flat 70% + Addl. 25% Off + 30 Days Extra Lab on all Courses | Use Coupon HS25 in Checkout | Offer Expires In

  Enroll Now

Getting started with MySQL

One of the easiest ways to learn and work on SQL is using MySQL database.

What is MySQL:

MySQL is the most popular Open Source Relational Database Management System.

MySQL is one of the best RDBMS being used for developing various web-based software applications.

MySQL is developed, marketed and supported by MySQL AB, which is a Swedish company.

MySQL works on many operating systems and with many languages including PHP, PERL, C, C++, JAVA, etc.

Connecting to MySQL Server from CLI:

You establish the MySQL database using the MySQL binary at the command prompt.

-u > MySQL userid created by DBA for the users

-p > Password to connect to MySQL server as given by DBA to the users

-h > Hostname where MySQL Server is running. Not needed if server is running on the local machine.

Password can also be given in same command by putting the password just after -p without any spaces.

$ mysql -u username -p[password] -h [hostname]

OR $ mysql -u username -p

Enter password:**

To exit, type exit and Enter:

mysql> exit

From Lab -> Services, get your userid, password and hostname for MySQL.

Open a new terminal and submit below command after putting in correct values:

mysql -u userid -pNHkfcgfgr5566rp -h cxln2.c.thelab-240901.internal

You will get a MySQL prompt. Run a simple SELECT statement on the prompt.

SELECT "Hello World";

No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...