/*** Description, this class is suitable for small web site database backup, built-in MySQL connection, simply configure the data connection* and the location of the storage backup can be.* Class is materialized and you can connect to the database
Free space without advertising PHP mysql ASP access space
Free unlimited host features: Support php5+mysql5/asp+access;10g large space for most sites is equivalent to No limit, unlimited flow, space and database configuration comparable to the
Free Host free200Model: Free host 200M (free200)Current: 0 RMB/monthContent:-Free three domain name, can be bound to 4 domain names-Host Space 200M-Real-time web Interface modification FTP, domain name and home page, etc.-Assign a separate FTP
Free homepage Space/asp,php,jsp,asp.net,mysqlPrice: 0 RMB※ Web Space 100M, give a 20M database, limited resources, each user can only apply for one;※ Independent FTP Account 1, IIS connection is unlimited, the flow is not limited;※ has the control
mysql5.6 Database:
The code is as follows
Copy Code
[BIGHD] (root@127.0.0.1) [cm]> SELECT version ();+------------+| Version () |+------------+| 5.6.13-log |+------------+1 ROW in SET (0.02 sec)[BIGHD] (root@127.0.0.1)
MySQL as the most commonly used database, often encountered a variety of problems. What we're going to say today is the changes to the table storage engine. There are three ways, the list is as follows.
1. True connection modification. It is slower
MySQL set a numeric column, you need to take into account the range of values, so the value of the type must be considered, the following is the MySQL numeric type of storage length, of course, storage length is basically determined by its range.
Delete Database command drop
Command: Drop Database
The code is as follows
Copy Code
mysql> drop Database drop_database;
Query OK, 0 rows Affected (0.00 sec)
So the database name is deleted
There may be an
Scenario: Perform a full backup every Sunday and perform an incremental backup 1 o'clock in the afternoon every day
Configuration
The prerequisite for performing an incremental backup is that MySQL opens the log-bin log switch, for example in
Encountered some errors in the project process that occurred because of a database version reason
MySQL server Upgrade Data restore table structure cannot be displayed
After the MySQL server upgrade, after the database data is restored, the DESC
1. vi/home/zhangy/database_bak.sh2.3. #!/bin/sh4. # File:/home/zhangy/database_bak.sh5. # Database Info bakupmysql TANK 2009/11/046. Db_user= "Root" #用户名7. db_pass= "********" # Password8. Db_name= "MyBlog" # Name of the data to be backed up9.#
For some large data systems, the problem is that the query efficiency is low, and there is a very important problem is that the insertion time is long. We have a business system that requires 4-5 clocks per day for data import. This time-consuming
The format () function is used to format a number of x:###,###,##### truncated to D decimal places in the following format. The following example shows how to use and output the format () function:
The code is as follows
Copy Code
command-line import large files use the source function directly
Import Database
Common source Commands
Enter the MySQL database console,
such as Mysql-u root-p
Mysql>use Database
Then use the source command, followed by the script file (such
Usually there is a field in the table that creates date, and other databases have the option of default values. MySQL also has a default value of timestamp, but in MySQL, not only is the insertion of the modification will also update the value of
1, through floor error
You can use the following code
The code is as follows
Copy Code
and select 1 from (SELECT COUNT (*), concat (version (), Floor (rand (0) *2)) x to Information_schema.tables Group by X);and (select
MYSQL Modify Root Password command
CMD switch to MySQL installation directory
Cases
D:/mysql/bin
Prerequisite: The MySQL user root password is empty.
Enter Mysql-u root MySQL
In mysql> state enter update user set Password=password (' New
Look at my example first.
Error resolution for character set
The problems that arise:Mysql> Update Users-> set username= ' Guan Yu '-> where userid=2;ERROR 1366 (HY000): Incorrect string value: ' Xb9xd8xd3xf0 ' for column ' UsernAme ' at row 1
An
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