Go to MySQL Literacy article

Source: Internet
Author: User
Tags mysql client mysql download administrator password

Article excerpt from: Http://www.jellythink.com/archives/636MySQL Literacy article2014-09-15 Category: MySQL/Database reading (1412) Comments (1) Why summarize MySQL?

To tell the truth, MySQL also used for a period of time, from the university stage began to use, but never systematic study, just use, very confused, a lot of things are used to muddle, to tell the truth, this feeling is very empty, always let people not practical, and the database is an IT person must have the skills, so, From this article, I chose MySQL as the breakthrough point, starting from the most basic start, summarize MySQL. Although online this aspect of the course is very many, but oneself summarizes the thing, will really call own.

Literacy

MySQL download and installation, no nonsense, whether you are Baidu and Google, this you can do it yourself. MySQL as a database, mainly consists of two parts, server side and client. Simply put, the server is used to save the data, the client is connected to the server side, the server for a variety of operations. So, when we want to operate MySQL, we need to start the server side, and then start the client to connect to the server side, for various database operations.

We can start the MySQL server program by starting the Mysqld.exe in the Bin folder of the MySQL installation directory, this program is a daemon, it will start the MySQL server, after starting the MySQL server, we can connect to the server through the MySQL client, here is the main summary of my Sql.exe and Mysqladmin.exe are the two clients. Now that you have started the database server, you can also shut down the MySQL database server by using the following command:

mysqladmin -u root -p shutdown;

What is the Mysqladmin command, which will be mentioned later.

Set the MySQL administrator password

To connect to the MySQL server requires a password, in general, the root user installed MySQL password is empty, so you need to manually set the password, the command is as follows:

mysql -h localhost -u root;set password for [email protected]=password(‘newpassword‘);

Log in to MySQL with a blank password before using the command above to set a new password. After that, you will need to enter the password when you connect to the server again.

Mysql.exe Client

MySQL provides a number of useful clients, and now summarizes a few of the more commonly used command-line clients.

The Mysql.exe client is a particularly useful client that can manage almost every aspect of MySQL: Create, modify, and delete tables and databases, create and manage users, browse and modify server configurations, query table data, and more.

The command to connect to the MySQL database using the MySQL client is as follows:

mysql -h localhost -u root -p

-h specifies the host on which the server resides;
-u Specifies the user name of the connection server;
-p Specifies the password to connect to the server.

After you successfully connect to the server, you can perform various operations on the database.

Mysqladmin.exe Client

The Mysqladmin client is used to accomplish a number of administrative tasks, most notably creating and deleting databases, monitoring Server status, and shutting down the MySQL server daemon. The usage is almost consistent with MySQL, but the mysqladmin client has much less functionality than MySQL, which is typically used only in certain situations.

The client I'm using

I usually use the Mysql.exe client while working, while the GUI client used is navicat for MySQL. This will satisfy my daily work.

Summarize

This article is very simple, is to tell you how to open the MySQL database, if you can access the MySQL database from the client, this is the premise of all learning, so here first to say, the back of the MySQL blog, began to summarize the relevant development knowledge of MySQL, Basically do not summarize the management of MySQL knowledge, because I will not, work also does not involve MySQL management tasks, basically is based on the development of MySQL.

September 15, 2014 in Shenzhen.

Go to MySQL Literacy article

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.