1. Create databases and datasheets with phpMyAdminWhen you create a database, set the collation to: "Utf8_general_ci"Or execute the statement:
Copy Code code as follows:
CREATE DATABASE ' dbname ' DEFAULT CHARACTER SET UTF8 COLLATE utf8
Share a little of my experience here
When you first started learning SQL, you would write this
Copy Code code as follows:
SELECT * FROM table order by ID LIMIT 1000, 10;
But when the data reaches millions, the writing slows
--Data for the row with the largest (small) value grouped by a field
Copy Code code as follows:
/*
The data are as follows:
Name Val Memo
A 2 A2 (the second value of a)
The first value of a 1 a1--a
The third value of a 3 a3:
MySQL database from needless to say, now a lot of application development applications and webmasters are often used to, JDBC may generally be more unfamiliar, what does JDBC mean? Also mentioned here, the most important thing is to introduce to you,
The first step: Write JavaBean
Copy Code code as follows:
Package withouttears.jdbc.db;
Import Java.util.HashMap;
Import java.sql.*;
Jndi has two core interface context and DirContext,
The context contains basic name operations,
If you are using a database that suddenly appears to be a class problem
Under Linux to execute the following command on it, of course you have to find your MySQL directory
In Linux
Copy Code code as follows:
MySQL 5.1 supports triggers as well as custom function interface (UDF) features, and can implement memcache Automatic Updates if combined with Libmemcache and memcached functions for MySQL. Simply record the installation test steps.
Installation
Since MySQL5.1.0, a feature has been added – Event scheduler Scheduler, which can be used to perform certain tasks on a scheduled basis and as a time based trigger.
First, openEvent scheduling is turned off by default and opens executable
MySQL 5.6 will automatically hide the password information in the log. This is not just confusing, then the one-way hash value is stored in the log file. You can disable the password-hiding feature of the log file by setting Log-raw=off. Log-raw
Time format for 2013-03-12
Check out the Day data:
Copy Code code as follows:
SELECT * from ' table ' WHERE date (time field) = Curdate ();
Query out the Month field:
Copy Code code as follows:
SELECT *
From ' table '
We usually have to count the number of connections in the database to refer to the total number of statistics, not subdivided into each IP. Now to monitor the number of connections per IP, the implementation is as follows:
Method One:
Copy
In our web application, although PHP, JSP and other scripts have provided the MySQL interface, but obviously directly using C language has better security and performance, in this article can be reflected.
First look at the structural body:The
This example describes the exception handling method for MySQL stored procedures. Share to everyone for your reference. as follows:
Mysql> mysql> delimiter $$ mysql> mysql> CREATE PROCEDURE myProc-> (p_first_name VARCHAR (30),- > P_last_name
MySQL Master Sync configuration
Server name
Ip
System
Mysql
Odd.example.com
192.168.1.116
rhel-5.8
5.5.16
Even.example.com
192.168.1.115
rhel-5.8
5.5.16
Suppose the
The following issues occurred today when you started MySQL:
[Root@www ~]# mysql-u root-p
Enter Password:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (usin G Password:yes)
Online answers are various, the final
Recent MySQL installation problems:
1. The operating system is different, the installation process of removal, cleaning is also different:
window 7: Install the MySQL process, the last installation to the start service when prompted to have
How many types of MySQL backups are available, please describe briefly:Database logical backup \ Physical BackupPhysical backup is divided into Lengbei and hot standby
A. Direct copying of data files to a safe place for preservationB. Use of
Once you have a connection to the MySQL server, you need to select a specific database job. This is because the MySQL server may have more than one database.from the command prompt, select the MySQL database:
It is very simple to select a specific
The actual line of the scene is more complex, then involved in the TRUNCATE, delete two operations, confirmed lost data almost 70,000 lines, and so on stop, almost a total of more than 10,000 rows of data written. Here for a simple explanation, just
1. Insert data to derive from other tables
Table A has ID, cola fieldTable B has ID, cola, colb ... Fields, where the IDs are all primary keys, cola as columns of the same nameNow you want to insert the colb>1000 records from Table B in Table A,
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