/ / MySQL - Windows Console Commands

MySQL - Windows Console Commands

The development of information technology is one of theadvanced directions of human activity. Therefore, a huge amount of money is invested in this area. Since the beginning and until today, many different tasks have been solved, which have greatly facilitated the daily life of many people. However, with the development of technologies, a number of problems arose, one of which was the excessive amount of information to be stored. The databases were designed to resolve the situation.

A Brief Overview of Database Management Systems

Since the problem of storing a large volumeinformation is relevant for today, there are several ways to solve. Each of them is focused on tasks of a certain direction. However, in the aggregate, they form a complete complex, which allows to simplify the problem of data storage.

mysql console commands

There is a certain classification thatdetermines the need to use a particular database and DBMS (database management system). The most common at present is considered to be client-server technology of data storage. These include: Firebird, Interbase, IBM DB2, MS SQL Server, Sybase, Oracle, PostgreSQL, Linter, MySQL. We will be interested in the last option - MySQL, whose commands fully comply with SQL standards. This technology is one of the popular and often used to solve both local applications and production tasks of small scale.

MySql command

The forerunners of client-server technology are file-server DBMS, which lost their positions due to a number ofThere are some drawbacks, among which there is a need to extend the database engine on each computer and a significant load on the local network, leading to an increase in time costs. This group includes Microsoft Access, Borland Paradox.

New technologies gaining popularity

However, a few years ago there was advanced technology, which acquires popularity and is in demand when solving small local problems. This is about embedded database management systems. The main feature of the DBMS in question is the lack of a server part. The system itself is a library that allows a unified way to work with large amounts of information placed on a local computer. This method excludes drawbacks file-server means, and also considerably exceeds in speed client-server technologies.

ySql command console

Examples include OpenEdge,SQLite, BerkeleyDB, one of the variants Firebird, Sav Zigzag, Microsoft SQL Server Compact, Linter, and also one of the variants of MySQL, the commands of which do not differ from those used in client-server DBMS. but built-in systems can easily lose their relevance if the problem ceases to be of a local nature.

Main advantages of MySQL DBMS

The MySQL database management system isone of the most popular technologies, as it can be used to solve a huge number of tasks. If we compare it with modern analogues, then we can single out a number of main advantages.

The main advantage in the Russian market is itsavailability, since it is free in most cases. The second feature is speed. One of the most popular systems is MySQL. Commands in it are executed quickly, with a minimum response time. Does not affect the speed of processing commands connecting to the server of multiple clients in multithreaded mode by using the InnoDB mechanism for fast transaction support.

MySql linux commands

The presence of ODBC driver allows you to simplifydevelopers solution of many problems. The advantages are also the ability to implement fixed and variable length records. But the main function, which is very appreciated in the circle of programmers, is the interface with C and PHP languages. The possibilities provided by MySQL allowed using this DBMS for a huge number of providers of Internet hosting services.

And for a common man who shows interest inmodern technologies of information storage, it is necessary to study MySQL, SQL commands and their syntax because specialists in this direction are widely in demand and highly paid anywhere in the world. Therefore, if someone is interested in this direction, do not hesitate. It is necessary to proceed to the study right now.

What is necessary to study

At first glance it may seem that thisthe region is complex in independent study and requires constant communication with a specialist. However, this is not the case. To study the architecture and features of MySQL, the basic commands of the query language and everything related to it, you can independently, without resorting to the help of a consultant. To do this, it is enough to have the desire and make the effort to move on. Only self-development and study of this area will allow to acquire new knowledge, consolidate the acquired skills and, possibly, start building a career and moving ahead in this direction.

MySql command console

To learn the basic commands, first of all, it is necessary to have at hand free of charge version of the MySQL console utility. It is with her that the learning process begins. You can download it from the official MySQL site. It is easily installed on any operating system, forming a server and client on one computer, which is very convenient.

Then it is necessary to resort to the search for a trainingmanual containing basic information about the MySQL environment. Console commands for basic learning, as a rule, are also contained in them. There is a lot of information about this. However, the choice must be taken seriously. Information should be presented consistently and clearly structured.

If you have a basic knowledge of English, you can use the built-in console support. For this there is a special command help, which helps to understand the use of the MySQL utility.

Basic Console Commands

Smoothly passing from the main features,opportunities and advantages, we got to the list of the main teams. The MySQL utility initially contains only one user, which is just used for learning. This is a user with a name root, the password for which is identical to the name.

When the first and subsequent starts of the MySQL console, the user will need to enter a password root for further work with the MySQL database. The console commands will only be accessible after authentication.

mysql basic commands

After a successful test, for convenience, you can display existing commands using the command help. After that, the console will present all existing commands and a brief description to them.

Control and display commands

Now go to the next step. To do this, you must select an existing database or create a new database. To select an existing database, use the use command. And enter the name of the database through a space. Initially, in the utility it exists only one - with the name test. Therefore, the query will look like this: use test.

To create a database, you must use the command create, indicating the keyword database and giving the appropriate name. The structure will take the following form: create database Name_of_database. To work with the created database, you need to contact it using the command use.

MySql Windows Console Team

In the environment, a function isto display existing databases, tables, primary keys or external links and display the information about them on the MySQL console. Teams in this case should always start with a sentence show. For example, in order to display the list of available databases for the current user, just type the following query: show databases. To display the table, it is enough to change the display object after the keyword, by typing tables.

Table management commands

Before proceeding further, it is necessary againto remind that compliance with the standards of the SQL language provides ample opportunities for developers, regardless of the DBMS and operating systems used. Queries developed in any environment that supports the SQL standard will successfully work (in the presence of a database and tables) in a MySQL environment. The Windows console commands are no different from those used in other operating systems.

To work with tables, there are a number of specific commands that, if translated from English, speak for themselves. About the team create was mentioned above. It can also be used to add tables to a previously created database. To delete database objects, in particular tables, use the command drop, to which the name of the destroyed object is added. Example: drop name_of_your_table.

The syntax for accessing the database server is alwaysgeneral structure. Therefore, a query developed in Windows will work well in the MySQL Linux console. Commands processed by the server without errors in one operating system can not lead to errors in others.

The Select command

But the most important command for working with tables is the command, the syntax of which is quite simple - the command select. It is used to select data from the database. The initial syntax has the following structure: select * from table_name. By sending such a request to the database server, the client must receive all records stored in the table.

mysql of the php command

Many people never think about it, but when you browse the Internet, MySQL commands are constantly used. PHP queries use the syntax of the SQL language to display the contents of online store directories or news on social networks. Instead of the "*" sign after the sentence select, as a rule, a list of the main fields of the table or several tables, the data of which must be processed. In the case of a sample from several tables, a special bundle is used join, which serves to connect them to existing external links. However, this condition can be changed, independently indicating which fields should be used for communication.

Setting the sampling constraints

Sometimes there is a situation where the answer,received from the database server, contains duplicate data. In order for the user to see only unique records, the distinct clause is used. It is placed in front of the list of requested fields and serves as an auxiliary tool for hiding duplicates.

</ p>>
Read more: