Install MySQL
# Cd/usr/downRun ls-L to list the files in the current directory. # Groupadd MySQL
# Useradd-G MySQL (if you select "Install all" when installing the toolkit, the commands for adding these two user groups will prompt that the user
-- MySQL group sorting is the simplest SQL statement for the first N records.Use test;Drop table if exists test;Create Table Test (Id int primary key,CID int,Author varchar (30)) Engine = MyISAM;Insert into test values(1, 1, 'test1 '),(2, 1, 'test1 '
Label: MySQL string
The following Article describes the actual operation scheme of the MySQL string addition function, we all know that in MySQL databases, the + operator cannot be used to actually connect MySQL strings. The Concat ()
MySQL may encounter Chinese garbled characters for the following reasons: 1. server settings, such as Latin1 2. table language setup issues (including character and collation) 3. connection language settings of client programs (such as PHP) utf8
Using MySQL is often a client operation based on the image interface. Two good SQL commands are used in command line client, as shown below.
1. truncate table xxxDuring the test, I hate the fact that the primary keys of a table keep increasing. I
Method 1:Under/usr/local/MySQL/bin:./Mysqladmin-u Root Password 'new _ password'This method is usually used for installation.
2. Change the password of another user as the root user:
Mysql> set password for 'root' @ 'localhost' = PASSWORD ('abc ');
How can I retrieve the MySQL Root Password !!!!!!! I installed MySql in Linux and changed the empty root password when I first installed it. At that time, I also changed a memorable password. I did not expect to forget it one day later.
Because the
After XAMPP is installed, the default password of the root user of MySQL is blank. How can I set a password for MySQL? As follows:
1. In Windows XAMPP:\... \ XAMPP \ mysql \ bin \ mysqladmin-u root-P password New Password
For example, mysqladmin-u
MySQL, as the most popular free database service engine, has been popular for a long time. However, some people may not know much about the internal environment of MySQL, especially those mechanisms for concurrent processing. Today, let's take a
For MySQL read/write ratio statistics, we generally obtain the relevant values by counting "show global status like 'com _ %. Here is a good script. It is a good option to view the read/write ratio of MySQL in real time. Its project home page is
MySQL 5.5 and later use cmake for installation. For more information, see:
http://www.blogjava.net/kelly859/archive/2012/09/04/387005.html
Link.
1: Download: The current MySQL version has reached 5.6.10
Wget
Http://www.oschina.net/question/185178_112783? Sort = Time
Purpose: To migrate a digital project to Linux.
Problems:
1. The database is an SQL Server and needs to be transformed into MySQL.
2. Test in Linux.
3. The newly added functions, such as
Create and delete IndexesYou can create an index in the create table statement, or use the create index or alter table statement to add an index to the table. You can use alter table or drop index statements to delete indexes.(1) Use the alter table
1. Create an indexIndexes are especially important for applications where queries account for the majority. In many cases, the performance problem is very simple because we forget to add an index, or we have not added a more effective index. If no
Bigint
Integer Data from-2 ^ 63 (-9223372036854775808) to 2 ^ 63-1 (9223372036854775807) (All numbers ). The storage size is 8 bytes.
P.s.Bigint has a length. The length in the MySQL table is only used to display the digits.
Int
Integer Data from-2 ^
Group_concat function in MySQL
The complete syntax is as follows:
Group_concat ([distinct] field to be connected [order by ASC/DESC sorting field] [separator 'delimiter'])
Basic Querymysql> select * from aa; +------+------+ | id| name | +------+----
1. the MySQL view operation is only supported by the new version of the database. The advantage of the view operation is that it can simplify the query of the database. In particular, we can create a view for some frequently queried data tables
(To http://blog.donews.com/yllr/archive/2007/01/03/1107388.aspx)
MySQL and later versions support multi-character sets, but the default Character Set installed is Latin1 in Swedish, so many people want to install discuz and other forums that use GBK,
MySQL supports the limit keyword, which allows MySQL to return only a specified record, for example:
Select * From usermsgbox limit 3
This SQL statement allows MySQL to return the first three records in the usermsgbox table, as well:
Select *
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