Command preparation
Create directory
Mkdir directory name
Chmod 777 permission for directory name change
Add startup Item Service
Chkconfig -- add php-fpm
Chkconfig nginx on
Searching for file locations is often used to find various configuration
This morning, a friend told me that his mysql had forgotten the root password and asked me to help you. I found the information online because I have never been in touch with mysql.
I have already put it into practice! The mysql version is 5.1
The
When using the Mysql database, the most troublesome problem is that the connection error Exception may occur from time to time. Similar exceptions are as follows (Hibernate is used as an example ):
org.hibernate.util.JDBCExceptionReporter - SQL
Use REGEXP keyword 1. Basic Character matching
SELECT prod_nameFrom ProductsWhere prod_name REGEXP'.000'Difference between LIKE and REGEXP
LIKE matches this column, while REGEXP matches the column value.
Regular Expressions in MySQL are
We know that in SQL, we can use the like predicate (expression) for fuzzy search, and support % ,?, _ And Other placeholders.However, the fuzzy search function has many restrictions, which are too vague.In MySQL, The REGEXP keyword is provided to
In the project, you need to search for a large text field. The result shows an interesting problem. The fuzzy match mode such as % LIKE % was used, the two strings must be exactly the same before they can be matched. Then, the two strings are output
The unified encoding method is UTF-8, And the csv file encoding method is set to UTF-8.
Create a new table in the database. The column attributes must be consistent with the csv file. Set ** month ** to date format in csv, instead of string, in this
Function
Mysql spatial extension
PostGIS
Spatial Index
Only MyISAM supports the R tree index, but InnoDB does not.
GIST tree index (variant of the R tree)
Supported space types
Start: net start mysql;Enter: mysql-u root-p/mysql-h localhost-u root-p databaseName;List databases: show databases;Select Database: use databaseName;List tables: show tables;Show columns from tableName;Create a database: source
Recently, the project database management system was migrated from SQL SERVER2000 to MySQL. After connecting to SQL SERVER Based on ADO and using the MySQL database management system, the database creation, table creation, and database read/write
Configure mysql master-slave replication in Windows 8.1. test environment overview win8os, 64-bit OS, memory, download mysql5.6.16-winx64.zip package on the local disk decompress two mysql, ports 3310 and 3311, namely: localhost: 3310 -- master
MYSQL was used in a recent project, because I had done it before, so I didn't think much about it. I just finished the next step. On the official website, I decided to launch an installer (5.26), modified the default location and configuration,
Database Backup is very important. If you back up data regularly, you can restore the data to the last normal state in case of a system crash, reducing the number of data backups to a minimum.
I. Using Minhang for backup
MySQL provides a mysqldump
I. Data Tables
To ensure data integrity and consistency, you must specify the field name, field type, and field attribute when creating a table. Constraints, indexes, and ), primary key and foregin key.
Constraints:
Not null non-empty
Just migrated a project to the newly installed linux system, because mysql is used to install it:
Yum install mysql
Yum install mysql-server
Then start the mysql service:
Service mysqd start
At this time, you can log on, but the root user
The following describes the usage of fuzzy search in mysql:1, %: represents any 0 or multiple characters. It can match any type and length of characters. In some cases, if it is Chinese, use two percent signs (%.For example, SELECT * FROM [user]
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.