MySQL database environment and simple operations, mysql database environment

Source: Internet
Author: User
Tags heidisql

MySQL database environment and simple operations, mysql database environment

**************************************** ******************************************************

Original works, from the "Xiaofeng residual month xj" blog, welcome to reprint, reprint please be sure to indicate the source (http://blog.csdn.net/xiaofengcanyuexj ).

For various reasons, there may be many shortcomings. Thank you!

******************************************************* **************************************** **********

I recently learned MySQL by myself. After successfully installing MySQL in Windows, I found that its usage is very different from that of other databases. Here, other databases mainly refer to SQL Server, the SQL Server database has a graphical interface, which is relatively intuitive and easy to operate. MySQL without plug-ins does not have a graphical user interface, however, some client tools such as HeidiSQL can be used to conveniently browse and edit data in a UI environment, create and edit tables, views, processes, triggers, and schedules, export structure and data SQL files. However, most developers prefer to use MySQL through command lines in a DOS environment, which is a bit like a Unix/Linux environment: using the command line-based terminal mode.

1. Command Line

1.1 Login

In Windows, mysql-h ...... -U ...... -P ......, H is followed by the communication host, u is followed by the current database user name, p is followed by the logon password of the current user. For example, the current communication is the local host, and the user is root, if the password is *******, the correct command is as follows:

mysql -hlocalhost -uroot -p********


You have logged on to the MySQL database, and then you can enter your command after "mysql>.

1.2 display Database

A simple language seems to have never been learned in the memory of SQL.

show databases;

The preceding figure shows all the databases that the current user can see. Note that ";" in "show databases;" indicates a complete SQL statement.

1.3 operate a database

First, select a database and perform corresponding operations.


For example, use

use mysql;
Select the "mysql" database and view the "mysql" table,

 show tables;
1.4 SQL operations

MySQL databases support SQL statements. Therefore, SQL statements can be used in MySQL.


For more specific operations, there may be no graphical interface for MySQL operations.


2. HeidiSQL

HeidiSQL is a graphical interface used to simplify your MySQL server and database management. The HeidiSQL software allows you to browse your database, manage tables, browse and edit records, and manage user permissions. In addition, you can import data from text files, run SQL queries, synchronize tables between two databases, and export the selected tables to other databases or SQL scripts. HeidiSQL provides an easy-to-use interface for switching between database browsing, SQL queries, and labels with highlighted syntax. There is an article about the use of HeidiSQL which is well written and initialized.

As I am about to change my role and step into the workplace, I have been trying to learn the programming languages and programming tools used in my work. Sometimes I feel a little thin to write something like this, hope to help everyone who is learning the relevant knowledge to learn and communicate with each other!






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.