*********************************************** Declaration *********************** *******************************
Original works, from the "Xiaofeng Moon XJ" blog, Welcome to reprint, please be sure to indicate the source (HTTP://BLOG.CSDN.NET/XIAOFENGCANYUEXJ).
Due to various reasons, there may be many shortcomings, welcome treatise!
*************** ******************************************************************************************
recently self-taught MySQL, in the Windows environment successfully installed after the discovery of usage and other databases are very different, here other databases mainly refers to the SQL Server,sql Server database is a graphical interface, easy to operate relatively intuitive While MySQL without plugins has no graphical user interface, you can easily browse and edit data in a UI environment with some client tools such as Heidisql, create and edit tables, views, processes, triggers and schedules, export structures and data SQL files, and more. However, most developers are more accustomed to using MySQL in a DOS environment as a command line, which is a bit like the Unix/linux environment: using a command-line-based terminal pattern.
1. Command line
1.1 Landing
Under Windows System, mysql-h ...-u ...---P ... .. , here h after the communication host, U followed by the current database user name, p followed by the current user's login password, for example, the current communication is the local host, the user is root, the password is ********, the correct command is typed:
mysql-hlocalhost-uroot-p********
This is where you have landed on the MySQL database, and then you can type your command after "mysql>".
1.2 Displaying the database
A simple language, memory of the SQL language seems to have not learned.
show databases;
The above is the current user can see all the database, note "Show databases;" In the ";" A good addition, representing a complete SQL statement.
1.3 Manipulating a database
First select a database, and then do the appropriate action.
For example, use
Use MySQL;
Select the MySQL database and look at the table "MySQL",
Show tables;
1.4 SQL Operations
MySQL database is supported by SQL statements, so SQL statements can generally be used under MySQL, here is not much to say.
for more specific operations, there may be no graphical interface for MySQL operations .
2, Heidisql
Heidisql is a graphical interface for simplifying your MySQL server and database management. Heidisql software allows you to browse your database, manage tables, browse and edit records, manage user permissions, and more. In addition, you can import data from a text file, run SQL queries, synchronize tables between two databases, and export selected tables to other databases or SQL scripts. Heidisql provides a simple and easy-to-use interface for switching SQL queries between database views and labels with syntax highlighting. About the use of heidisql , there is an article written well, the initialization of the work.
As soon as the change of character, by the students into the workplace, so has been trying to learn a variety of work in the programming language, programming tools, sometimes feel like writing some of these things slightly shallow, I hope to help everyone learning relevant knowledge, learn to communicate!
MySQL database environment and simple operation