MySQL Beginner usage Guide and introduction
One, 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
The date_add and date_sub functions can be added and reduced using the time interval identified by the interval keyword, similar to the Strtotime function in PHP.1. Update the validity period of the Table Valid_time field value is increased by one
what is the storage engine? Mysqldata is stored in a file using a variety of different technologies(or Memory)the. Each of these technologies uses different storage mechanisms, indexing techniques, locking levels, and ultimately offers a wide range
Error reason: The socket file does not exist in the/var/lib/mysql directory.There are two ways to connect to a MySQL server: A TCP connection, a socket file connection. Through the socket file, start the MySQL service, the MySQL service will
A mature database architecture is not designed to be high availability, high scalability and other features, it is with the increase in user volume, the infrastructure is gradually improved. This blog post mainly on the MySQL database development
Mysql-5.6.25-win32.zip from the official download down the size of 343MB, too big can be deleted from the place to recordDocs: Delete allSql-bench: Delete allMysql-test: Delete allBin: Remove the PDB suffix fileLib: Only left
The formula is as follows, Unit meter: 1th Latitude: lng1 lat1 2nd latitude and Longitude: lng2 lat2round (6378.138*2*asin (Pow ((sqrt () LAT1*PI (180)/2), 2) + Cos (LAT1*PI ()/180) *cos (Lat2*pi ()/180) *pow (Sin ((Lng1*pi ()/180-lng2*pi ()/180)/2),
(1) The difference between MySQL and mysqli is:The MYSQLI connection is a permanent connection, and MySQL is a non-permanent connection.MySQL connection: Whenever a second use occurs, a new process is reopened.MYSQLI Connection: Always use only the
Page level: Engine BDB.Table level: Engine MyISAM, understood to lock the entire table, can read at the same time, write NoRow level: Engine INNODB, single row of records plus lockTable level, which locks the entire table directly, and other
back up a MySQL instance of about 250GA. Using Xtrabackup Backup and gzip single-threaded compressionTime Innobackupex--user=test--password=test--socket=/home/mysqld.sock--slave-info--defaults-file=/etc/mysql/my . CNF--stream=tar/home/backup | gzip >
This article has compiled some common methods of MySQL optimization, to do a simple summary sharing, to help those who do not have full-time MySQL DBA to do the basic optimization work, as for the specific SQL optimization, most by adding the
The MySQL lock is available in the following ways:1. Table-level lock, low overhead, lock fast, no deadlock, lock granularity is high, the probability of lock conflict is highest, and the concurrency is the lowest. The MyISAM engine belongs to this
Write in frontMySQL database was used in the project, and MySQL was not used before, and today we learned the common syntax of MySQL, which is very similar to SQL Server syntax. It's pretty simple to use.An example1. Create a database named school.1.
In the previous two blogs, we discussed how to install and use Docker, and how to deploy an Apache server in Docker and access the server in an external computerLet's discuss how to use Docker to deploy a MySQL database and access the database on an
For experimentation convenience, we configure two MySQL services on the same machine (two ports open)1. Install and configure MySQLMySQL has been installed beforehand;[[email protected] ~]# cd/usr/local/[[email protected] local]# cp-r mysql/mysql_2[[
Insert data to a MySQL table.
To INSERT data to a MySQL table, run the SQL INSERT INTO command. You can insert data into a MySQL table using a mysql> prompt or using any script, such as PHP.Syntax:
The following is a general SQL syntax INSERT INTO
How to Use SQRT functions in MySQL
This article describes how to use SQRT functions in MySQL. It is the basic knowledge of MySQL beginners. For more information, see
The SQRT function of MySQL is used to calculate the square root of any number. You
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