MySQL must know-2nd Chapter-mysql Introduction

Source: Internet
Author: User
Tags microsoft sql server mysql client mysql commands mysql query mysql version mysql command line

Chapter II Introduction to MySQL

This chapter describes what MySQL is and what tools you can apply in MySQL.

2.1 What is MySQL

As mentioned, all the storage, retrieval, management, and processing of data is actually done by the database software--dbms (database management System).
MySQL is a DBMS, which is a kind of database software.
Reasons to use MySQL:

    • Cost--mysql is open source and can be used free of charge (and can be modified for free).
    • Performance--mysql performed very quickly (very fast).
    • Trustworthy-some very important and prestigious companies, sites using MySQL, these companies and sites use MySQL to process their own important data.
    • Simple--mysql is easy to install and use.
2.1.1 Client-Server Software

DBMS can be divided into two categories:

    • A class of DBMS that is based on shared file systems, including, for example, Microsoft Access and FileMaker, is used for desktop purposes and is typically not used for high-end or more critical applications.
    • Another type of database based on client-server Dbms,mysql, Oracle, and Microsoft SQL Server is a client-server based database.

Client-server applications are divided into two different sections.

    • The server section is a software that is responsible for all data access and processing. This software runs on a computer called the database server. Only server software deals with data files. All requests for data, data additions, deletions, and data updates are completed by the server software. These requests or changes come from the computer that is running the client software.
    • The client is the software that deals with the user. For example, if you request a product table that is listed alphabetically, the client software submits the request to the server software over the network. The server software processes this request, filters, discards, and sorts the data as needed, and then sends the results back to your client software.

The client and server Software may be installed on two computers or on a single computer. Regardless of whether they are on the same computer, the client software communicates with the server software for all database interactions. All of these activities are transparent to the user. Data is stored elsewhere, or the fact that the database server has done this for you is hidden. You do not need to access the data files directly. In fact, most networks are built so that users do not have access to the data, or even access to the drives that store the data. What is the point of this? Because in order to use MySQL, you need to access the computer that runs the MySQL server software and the computer that publishes the command to the MySQL client software.

    • Server software for MySQL DBMS. You can run on a locally installed copy, or you can connect to a replica running on a remote server that you have access to.
    • Clients can be MySQL-provided tools, scripting languages (such as Perl), Web application development languages (such as ASP, ColdFusion, JSP, and PHP), programming languages such as C, C + +, Java, and so on.

Installing Mysql-linux

2.1.2 MySQL Version

The current version of MySQL is version 5
Version requirements indicate that if a chapter is specific to a particular MySQL version, it will be clearly stated at the beginning of the chapter.

2.2 MySQL Tool

MySQL is a client-server DBMS, so in order to use MySQL, you need to have a client that you need to work with MySQL (to provide MySQL with commands to execute). There are a number of client applications to choose from, but when it comes to learning MySQL (specifically, when writing and testing MySQL scripts), it is best to use specialized utility programs. In particular there are 3 tools to be mentioned.

2.2.1 MySQL command-line utility

Each MySQL installation has a simple command-line utility called MySQL.
MySQL options and Parameters if you enter only MySQL, you may receive an error message. Because a security certificate may be required, or because MySQL is not running on a local or default port. MySQL accepts a set of command-line arguments that you can (and may need) use. For example, to specify the user logon name for Ben, you should use Mysql-u Ben. In order to give the username, hostname, port, and password, you should use Mysql-u ben-p-H myserver-p 9999. Complete command-line options and parameter lists are available for mysql-help.

Entering MySQL at the operating system command prompt will appear as a simple hint:

Of course, the specific version and connection information may be different, but you can use this utility. Please note:?

    • command input after mysql>;
    • command with; or \g end, in other words, press ENTER only to not execute the command;?
    • Enter Help or \h for assistance, or you can enter more text to get help for a specific command (for example, enter help select for assistance with the SELECT statement);
    • Enter quit or exit to exit the command line utility.

The MySQL command-line utility is one of the most used utilities and is valuable for quick testing and execution of scripts.

Familiarity with the MySQL command-line utility even if you choose to use one of the graphical tools described later, you should be sure to familiarize yourself with the MySQL command-line utility because it is a client that you can safely rely on (as it is part of the core MySQL installation).

2.2.2 MySQL Administrator

MySQL Administrator (MySQL manager) is a graphical interactive client designed to simplify the management of MySQL servers.
MySQL administrator is not installed as part of the core MySQL component. Must be downloaded from the link.
Install under Ubuntu

MySQL administrator prompts for server and login information (and allows you to save the server definition for later selection), and then displays an icon that allows you to select a different view.
Which:?

    • Information (server information) displays the status and version information of the client and the connected server;
    • Service control allows you to stop and start MySQL and specify server features;?
    • User administration is used to define MySQL user, login and permissions;
    • Catalogs (directory) lists the available databases and allows you to create databases and tables.

The MySQL administrator Tools menu contains options for starting the MySQL command line utility and MySQL query Browser (MySQL lookup browser).
MySQL Query browser also contains menu options for starting the MySQL command line utility and MySQL administrator.

2.2.3 MySQL Query Browser

MySQL Query browser is a graphical interactive client that is used to write and execute MySQL commands. Get MySQL query Browser like mysql administrator, MySQL query Browser is not a component of the core MySQL installation. Must be downloaded from the link.

MySQL Query browser requires you to enter the server and login information (share the saved definitions between MySQL Querybrowser and MySQL administrator) and then display the application interface.
Note the following points.?

    • Enter the MySQL command in the window at the top of the screen. After entering the statement, click the Execute button to submit it to MySQL processing.
    • The results, if any, appear in the large area grid on the left side of the screen.
    • Multiple statements and results are displayed in their own labels and allow quick switching.
    • The right side of the screen is a label that lists all possible data sources (called outlines), expands any of the data sources to view its tables, and expands any of the tables to see its columns.
    • You can also choose tables and columns to let MySQL Query browser write MySQL statements for you.
    • The right side of the schemata (outline) label is a history tag that keeps the execution history of the MySQL statement. It is useful when you need to test different versions of MySQL statements.
    • Help on MySQL syntax, functions, and more can be obtained in the lower right corner of the screen.

The saved script can be executed using the MySQL Query browser to execute the saved script (such as the script used to create and populate the table used in this book). To execute the saved script, select File, Open script, select the appropriate script (it will appear in a new tab), and then click the Execute button.

2.3 Summary

This chapter describes what MySQL is and introduces several client utilities (a 20-line utility, two optional but highly recommended graphics utilities).

MySQL must know-2nd Chapter-mysql Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.