1, table operation now the work of creating a table is mostly done using database management tools, although its nature is also used by SQL, but much more convenient. Now let's talk about using SQL statements to manipulate tables. 1.1 The base
I. BACKGROUNDAs the business of the project is constantly running forward, it is inevitable that the amount of database tables will become more and more large, constantly crowding out hard disk space. It is necessary to delete unnecessary data
Server:centos 7.0mysql:5.7.20 MySQL Community Server (GPL)1. Change Password after first login:According to the choice of installation, there are mysqld_safe with Mysqld_safe, no use mysqld. The normal installation should be in the/usr/sbin
Order:MySQL installation configuration issues on Windows systems.0x01Go to MySQL's official website to download the MySQL free installation file you want to build. https://dev.mysql.com/downloads/mysql/0x02Unzip the downloaded file. The Data folder
The previous talk about the optimization of MySQL, mainly to build a table for a large number of tables to add indexing mechanism, improve query efficiency, and some simple optimization of SQL statements, after all, I am not a professional database
1. Copy the service file to INIT.D and rename it to MySQLCp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysqld2. Give executable permissionchmod +x/etc/init.d/mysqld3. Add ServiceChkconfig--add mysqld4. Display the list of
See a python exercise online to randomly generate 8-digit coupons, and want to be saved to the MySQL database. I checked the data and wrote the following code to complete this little job.#!/usr/bin/env python# -*- coding: utf-8 -*-#author
One, create the user:Command: CREATE USER ' username ' @ ' host ' identified by ' password ';Description: Username-user name,Host-Specifies the host on which the user can log on, and if localhost is available to the local user, you can use the
1 Modifying table namesRename table AAA to BBB;OrRename table AAA to BBB;2 Modifying the data type of a fieldALTER TABLE person modify name varchar (20);3 modifying field namesALTER TABLE person change stu_name name varchar (25);4 Adding a field
Mysql -- trigger operation, Mysql -- trigger operation1. Why should I use a trigger?
2. Create a trigger 2.1 create a trigger with an execution statement
Example: There are two table objects in the database company: The Department table (t_dept)
Database-Mysql, database mysql
Let's talk about Mysql today. First, let's talk about itsHistory:
Mysql is a relational database management system. It was first developed by MySQL AB in Sweden and later acquired by sun. Later, sun was acquired by
Basic syntax for Mysql database Stored Procedures
drop procedure sp_name//
Before that, I have told you the basic knowledge of MYSQL syntax. In this article, I will explain the basic syntax knowledge to readers through the code in practice through
EXPLAIN commands and usage in MySQL, and EXPLAIN mysqlexplain
1. Scenario Description: My colleague taught me to use explain in mysql, so I checked the meaning of the returned content.
2. Now the useful content is recorded as follows:
1. explain
Install mysql on centos and set the operation method for remote access. centosmysql
1. Download the mysql repo Source
$ Wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
2. Install the mysql-community-release-el7-5.noarch.rpm
Instance test the enum type of MySQL, instance mysqlenum
Some status fields are often encountered during the development project, such as the order status: Pending payment, paid, closed, and refunded, my previous projects used numbers to store these
MySQL database Event scheduled execution task, mysqleventI. background
As the business of the Project is constantly moving forward, it is inevitable that the number of tables in the database will become larger and larger, and the hard disk space
Mysql -- index,1. Create and view Indexes
Common indexes are created without any restrictions (unique or non-empty ). This type of index can be created on any data type field.
(1) create a common index when creating a table
Syntax:
Example:
Powerdesigner cannot automatically generate comments,
To solve the problem that power designer cannot automatically generate comments, only three steps are required:
1. Press the shortcut key Alt + Shift + X to open the Script Editor;
2. Add the
Mysql installation and configuration
I,Configure the MySQL database
1. decompress the green version of mysql and change it to mysql5.7, as shown in figure
Compare versions earlier than 5.6, less data Directories (store data) and my-default.ini
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.