1. Install apache,mysql,php with Yum1.1 Installing Apache
The code is as follows
Copy Code
#yum Install httpd Httpd-devel
When Setup is complete, start Apache with/etc/init.d/httpd startSet to boot:
First, create the user:
Create user creates a new MySQL account. To use create user, you must have the global Create user permission for the MySQL database or have insert permissions. For each account, create user creates a new record in the
Look at its grammar first.
The left JOIN keyword returns all rows from the left-hand table (TABLE_NAME1), even if the right table(table_name2) does not have a matching row.
Left JOIN keyword syntax
The code is as follows
Copy Code
Restore a database: mysql-h localhost-u root-p123456 Www
Back up a database: mysqldump-h localhost-u root-p123456 www > d:/www2008-2-26.sql
Backup data:
The code is as follows
Copy Code
Mysqldump-u User name-p password
The following are the configuration steps:1, the MySQL configuration file my.cnf location
2, how to start, stop MySQL, find a good startup file
Assuming that there are two machines, MySQL has been installed (as far as possible version, and two
The code is as follows
Copy Code
Mysql>select * from xi_table into outfile ' D:test.xls ';
Export to TXT file:
The code is as follows
Copy Code
SELECT * from xi_table into outfile ' d:test.txt ';
COUNT (*) calculates the number of rows, including null
Count (column) calculates the number of rows for a particular column's value, and does not contain null values.
Count () is also used, and the use of Count (1) is the same as the result of
The following query selects all records and its date_col value is within the last 30 days:
The code is as follows
Copy Code
Mysql> SELECT something from tableWHERE To_days (now ())-To_days (Date_col)
DayOfWeek
1, find the problem of the program to join Mysql.colse () can be resolved.
2, directly modify the MySQL configuration, set time_wait time of not more than 5 seconds can
modifying methods in Linux systems
The code is as follows
We often use unique numbers in database applications. The Auto_increment property of the field can be generated automatically in MySQL. MySQL supports a variety of data tables, each of which has a different self added attribute.
ISAM Table
If you
MySQL provides a solution for this problem based on the built-in Full-text lookup. Here, developers simply mark out fields that require Full-text lookup, and then run the search in those fields using a special MySQL method, which not only improves
Recently, because of the need to study the MySQL random extraction implementation method. For example, to randomly extract a record from the TableName table, the general wording would be: SELECT * from TableName ORDER by RAND () LIMIT 1.
There are
Verification of the user name and password process, we usually do a system, many times will involve the authentication. Today we'll see how MySQL is coming in.
Row validation. (Note is login, not login ^_^)
First, the principle of
100W of data for many friends, but today I thought of creating a large number of data test environment, so I looked for how to insert 100W data, I used 20 fields. In contrast, the first is to use the MySQL stored procedures to get:
The
If you have forgotten the root password locally, try the following methods:
Open cmd first stop MySQL service
net stop MySQL
Enter the Bin folder in the MySQL installation directory and enter
Mysqld-nt--skip-grant-tables
Skip Password detection
LTrim function
The code is as follows
Copy Code
Mysql> Select Concat ('. ', LTrim (' ddd '), '. ');
RTrim function
The code is as follows
Copy Code
Mysql> Select Concat ('. ', RTrim
The simplest method of port judgment ==> only for database local useMethod for judging the 1:if condition of law
The code is as follows
Copy Code
[Root@oldboy scripts]# Cat check_db01.sh#!/bin/sh#created by Oldboy#mail:
Error message#1045-Access denied for user 'root' @ 'localhost' (using password: YES)Find the config. inc. Php file in the phpmyadmin directory and modify the following location:For the config. inc. Php file, the most important thing is to modify the
1. Update the installation environmentBefore installing this Web application, we need to update the latest system software package and run the following command line. The code is as follows:Copy code Sudo apt-get updateSudo apt-get upgrade 2.
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