Many friends have installed mysql but do not know how to use it. In this article, we will learn some common MYSQL commands from the aspects of connecting to MYSQL, changing the password, and adding users.1. Connect to MYSQL.Format: mysql-h host
MySQLHow does a database create a user table and set its IDAuto-increment ColumnWhat about it? This article mainly introduces this process. First, we will introduce the testing environment, and then introduce the detailed Code created, hoping to
The major improvements of this version are as follows:
Mysql_upgrade improvement: now we will verify whether the compiled version matches the server version. If not, exit. You can use the -- version-check and -- skip-version-checking options to
Using indexes in database tables can greatly improve the query speed. Suppose we have created a testIndex table:
Create table testIndex (I _testID INT NOT NULL, vc_Name VARCHAR (16) NOTNULL );
We randomly inserted 1000 records into the table, one of
1. rename database db_name TO new_db_nameThis .. This syntax is added to mysql 5.1.7 and removed from mysql 5.1.23.Data may be lost. Or don't use it.See: http://dev.mysql.com/doc/refman/5.1/en/rename-database.html
2. If all tables are of the MyISAM
Remove left space in mysql:LTRIM (str)Returns the string str with leading space characters removed.The following is a code snippet:Copy codeThe Code is as follows:Mysql> select ltrim ('barbar ');-> 'Barbar' This function is multi-byte safe.Remove
Google today announced that it has added native MySQL connection support for its cloud SQL service. Therefore, you can use MySQL Wire Protocol to fully manage MySQL services on Google cloud platform.
This Protocol (MySQL Wire Protocol) allows
Method 1: Use the mysql command to viewIn MySQL, you can view common system information directly by checking the status, as shown in the following example:Copy codeThe Code is as follows:1. $ mysql-u root-p2. mysql> s"Threads: 2 Questions: 224857636
15. Join table
One of the most powerful functions of SQL is to join tables during data retrieval and query execution. Join is the most important operation that can be executed using SQL SELECT.
A relational table is designed to ensure that
The description of Replace is similar to the insert statement.
If an old record in the table has the same value as a new record used for the primary key or a UNIQUE index, the old record is deleted before the new record is inserted.
Unless the table
TRUNCATE [TABLE] tbl_name
Truncate table is used to completely empty a TABLE. Logically, this statement is equivalent to the DELETE statement used to DELETE all rows, but in some cases, the two are used differently. For an InnoDB TABLE, if there is
Download phpMyAdmin 3.3.6The address is published. If you are interested in phpMyAdmin, you can go to phpMyAdmin to obtain the latest official address.Download phpMyAdmin 3.3.6Download and try it out. PhpMyAdmin 3.3.6 released this time is a
The create procedure proc1 (OUT s int) process in mysql is simple, but the 1307 error occurs during the import process, let's take a look at the solution to this problem.
Test
The Code is as follows:
Copy code
Create
This article will introduce the differences between mysql 5.5 and 5.6 timestamp fields DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP. I hope this tutorial will be helpful to you.
Mysql5.6 database:
The Code is as follows:
Copy
You can use many methods to import/export ultra-large SQL text files in mysql, such as direct command operations on the client, multipart import, and source command operations on the client.
In practice, sometimes mysql Database Import and import
The mysql database is upgraded to mysql 5.5 today. the previous mysql_connect is used to connect to The database. the following message is displayed: Deprecated: mysql_connect (): The mysql extension is deprecated and will be removed in the future:
How is the difference between ifnull and nullif functions used in mysql? I thought it was actually reversed. Otherwise, let's take a look at the usage of these two functions.
IFNULL (expr1, expr2)
If expr1 is not NULL, the returned value of IFNULL
I have introduced how to update another table with one table. Now let's take A look at the SQL statement article about mysql update updating table B based on table A. I hope this article will help you.
Recently, I encountered A requirement that both
This is a Linux file system under development. MySQL Databases on Linux can be processed as file systems. The development team hopes to get more suggestions. The following article translated from:
Http://no.spam.ee /~ Tonu/mysqlfs.html
--------------
The MySQL administrator should know how to set up the MySQL user account and specify which user can connect to the server, where to connect, and what to do after the connection. MySQL 3.22.11 introduces two statements to make this work easier: GRANT
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