Before reading the blog, make sure you had succcessfully installed MySQL for Mac.Create a database:
Login
Create a database
Create tables
$ mysql-u Root-p$ Enter Password:***Welcome ... Type'Help ;'Or'\h' forHelp.
Sql:select * FROM table where ID in (3,9,6);After such a situation is taken out, in fact, the ID or by 3,6,9, sorted, but if we really want to press in the order of the inside of what to do? Can SQL be completed? Do you need to take it back and then
MySQL function Description: Mathematical functions, String functions, date-time functions, conditional judgment functions, System information functions, cryptographic functions, etc.1. Mathematical Functions2. String Functions3. Date Time function4.
MySQL foreign key creation condition:1. Two tables must be a INNODB data engine2. Foreign key field of foreign key table must be primary key3. Field types must be consistentCreate a foreign key when creating a table:CREATE TABLE Tbl_client (userName
Type
Size
Describe
Char[length]
Length byte
Fixed-length field, 0-255 bytes long
Varchar[length]
String length + 1 bytes
The variable length field, before mysql5.03, has a length of 0-255
First, Binlog modeMySQL version 5.6 and later templates does not provide a binlog template, the default can only use Gtid mode, you can consider making your own template to use Binlog copy1.
Mysql>show Global variables like '%server% '; --View the current global character set+----------------------+--------------------+| variable_name | Value |+----------------------+--------------------+| Character_set_server | Latin1 ||
1 Create proceduregh () #注意各个地方的分号! This code should run the section that removes the last sentence, and then run call GH to display the results that have been stored2 BEGIN3 DeclareC_noint; #声明数据类型的方法4 5 Select Count(*) intoC_no # Depositing a
First, mathematical functions1 ABS (X) absolute value2 pi () π3 floor (x) maximum integer value less than x4 RAND ()| RAND (x) random number ; The X parameter produces the same random number at the same time.5 ROUND (x)| ROUND (x, y) rounding ; Y
Official Document: Https://docs.saltstack.com/en/2016.3/ref/returners/all/salt.returners.mysql.html#module-salt.returners.mysqlMySQL builds itselfThe first thing to do is create a database on the master machinecreate database ' Salt '
-Backup Database times wrong[ERROR]/usr/sbin/mysqld:table './daifans/wp_options ' is marked as crashed and should be repaired-Check the document on the Internet, said that the table is damaged, so WordPress articles are not displayed, need to repair,
1, modify the MySQL port number, to avoid the firewall to prohibit the opening of Port 3306; In the My.ini configuration file2. Create a MySQL user,Then give him permission,
Mysql-u root-p//login MySQL
Mysql> Grant all privileges on * * to '
This tutorial is suitable for PHP programmers who are interested in caching SQL queries to reduce the load on database connections and execution, and improve script performance.OverviewMany sites use databases as containers for site data storage.
first, connect MySQL. Format: mysql-h host address-u user name-P user password1. Example 1: Connect to MySQL on this machine.First open the DOS window, and then enter the directory Mysqlbin, and then type the command mysql-uroot-p, enter after the
The MySQL server has gone away error pcntl_fork before the database is connected. The reason is that the child process inherits the database connection from the main process, and when MySQL returns the data, these sub-processes can read the data
Mysqldumpslow is a tool that MySQL comes with to analyze slow queries, of course, not just this tool, but Percona-toolkit is Percona A collection of a set of command-line tools that are used to perform a variety of manual execution of very complex
Reprint: http://www.cnblogs.com/fnlingnzb-learner/p/5830661.htmlIf MySQL is installed and set up as per the previous method, it is a little easier to connect remotely. I will combine some articles on Baidu to analyze.Local Computer
It is often necessary to periodically delete historical data from certain tables, which are often very large, and in order to mitigate the impact on the online environment, they must be deleted in small batches.Previously shared version of SQL
MySQL reports error 1093, mysql reports error 1093
[Err] 1093-You can't specify target table 'user' for update in FROM clause
The error SQL statement is as follows:
Delete from 'user' where id not in (select min (id) as id from 'user' group by
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