Installing the MySQL database in fedora 8 is very easy. The procedure is as follows:
$ SuEnter the root password:# Yum install mysql-ServerDownload and install MySQLRun MySQL after installation#/Etc/init. d/mysqld start
After the MySQL service
Date_default_timezone_set ('prc'); // Default Time Zone echo "Today:", date ("Y-m-d", time (), " "; echo "Today:", date ("Y-m-d", strtotime ("18 June 2008"), ""; echo "yesterday :", date ("Y-m-d", strtotime ("-1 day"), ""; echo "Tomorrow :", date
For example, if my user name is root and the password is 123 SQL script, the C disk name is test. The SQL database name is test.
There are two ways to execute the script
1: Open CMD and enter the following command (directory conversion is not
It is mainly used to migrate a database in the original MySQL database (exdb is used as an example here) to a new environment (the new environment means that you have installed MySQL on another computer, I want to migrate the data in the exdb
Error 1130: Host '192. 168.1.3 'is not allowed to connect to this MySQL Server
Solution:Change the table. It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log in to MySQL on the
Sometimes you need to modify the null field value of the returned column when querying the database's left and right connections, for example, return 1 or 0.
At this time, the coalese (field, 0) function will be used. This function will change the
Reprint to http://www.sevenline.org/blogview.asp? Logid = 265
On the Internet, I also found some methods to exploit this vulnerability. Generally, it is to write an ASP or PHP backdoor, which is not only troublesome, but also the directory of the
MySQL getting started (5)
-- Multi-Table operations
We are familiar with the basic operations of databases and database tables. Now let's take a look at how to operate multiple tables.
Multiple tables may exist in a database, which are associated
-- Modify, backup, and Batch Processing
Sometimes we need to modify and delete database tables and databases, which can be implemented as follows:
1. Add a column:For example, in the mytable table in the previous example, adding a column to
I always thought that MySQL would randomly query several pieces of data.Select * From 'table' order by rand () limit 5You can.However, the test results show that the efficiency is very low. It takes more than 8 seconds to query 5 data records in a
First look at the instance:$ Keyword = "1 2 3 ";Echo $ SQL = search ($ keyword, "enter_gongyin_pic", "A + B + C"); // function generation, no limit, no orderGeneration:Select * From 'enter _ gongyin_pic 'where 'a' like' % 100' or 'A' like '% 100' or
Group by and distinct
Group by group, each group displays only one record
Distinct is followed by multiple fields to ensure that each field combination record is unique (distinct ID, name from)
Groupby having and where
Select *, (sum (WIN)/count (*)
I want to directly back up the database in the PHP background, so I have never thought of any idea. At the beginning, I was thinking about using PHP to access the directory where the server installed MySQL, for example, in the/usr/local/MySQL/data
Reprinted:
There are many methods, but we recommend that you first look at the MySQL development documentation, which is very detailed. If you are too lazy to read it, you can refer to the following1. There is a software PHP Excel parser pro v4.2
Data Operations
Select -- retrieve data rows and columns from database tables
Insert -- add new data rows to the database table
Delete -- delete data rows from a database table
Update -- update data in the database table
Select
General
1. Import the source code or jar package of xpagerv2.0 into the project.
2. Merge page. TLD into your WEB-INF.3. Add in Web. xml:/xdevelop.net/taglibs/page /WEB-INF/page. TLD
4. in JSP:
Webapplicationcontext WAC = webapplicationcontextutils.
Question: How many steps can an elephant be taken to the refrigerator?
Answer:: Open the refrigerator, put it in the elephant, and close the refrigerator.
The three-step strategy, haha, and secure configuration replication are also the same.
(I)
It is important to carefully select a data type. Why? It can improve performance and the principle is as follows:
● Storage (memory, disk), thus saving I/O (retrieval of the same data)
● Computing, reducing the CPU load
There are three types of
(I) any query is annoying.
As long as the query and MySQL are annoying, the fastest way to execute the query is not to execute
Cache is king, such as redis or memcache
(Ii) Minimum query result set
Try to query based on the primary key or
(I) Insert large data volume
(1) Replace a single row with multi-row insert: insert into T values (),(),(),...
(2) load data infile... into table t
(3) Write a temporary table and insert... select
(4) cancel the index and constraints, and
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