When you insert a record in a table in SQL or MySQL database, touch the trigger to insert another table in the same database into the same record.
In the process of learning, found that the two writing is different.
1, in the SQL set up two table
The formula for using EXECL to convert timestamps is:
Code:
=(xxxxxxxxxx+8*3600)/86400+70*365+19
use the MySQL statement to interpret timestamp syntax examples:
Code:
SELECT FROM_UNIXTIME(1234567890, '%Y-%m-%d %H:%i:%S')
All stems from an experiment, please see the following example:
Table:
Copy Code code as follows:
CREATE TABLE IF not EXISTS ' foo ' (
' A ' int (a) unsigned not NULL auto_increment,
' B ' int (a) unsigned not NULL,
' C '
In order to prevent security risks, we generally set up a separate database access account for each database, the account only has access to the database permissions. Let's take a concrete look at the following:
1, first we have to login phpmyadmin,
1, to determine that the firewall on the server does not block 3306 portsMySQL default port is 3306, you need to determine that the firewall does not block 3306 ports, or remote can not connect through 3306 ports to MySQL.
If you specified a
However, it is not intended to describe the implementation details of a storage engine, nor to describe the pros and cons of the various storage engines, but to explain how MySQL handles Binlog and to clarify several confusing issues.
Binlog is
MYSQL This database is definitely suitable for the DBA class to play, and generally do a little 10,000 news of small system how to write can, with the XX framework can achieve rapid development. But the data volume to 100,000, million to tens of
1, view the mysqld (/var/log/mysqld.log) log and discover the following error:
InnoDB:Error:log File/usr/local/mysql/data/ib_logfile0 is of different size 05242880 bytesInnodb:than specified in the. cnf file 0 104857600 bytes!030826 1:42:15 Can ' t
Prerequisites, both servers are installed MySQL the same version, the database name is the same, the best data are as much as possible.MySQL Server side 192.168.0.1:Create a new standby account that is used only to copy dataUser name: BackupPassword:
Pre-Configuration preparation:
2 PCs, all installed windows2003 64-bit. Divide the three districts c,d,e. Computer name one is master, one is slave.
Use the mysql-noinstall-mysql5.1.50 compression package.
First install MySQL on the D disk of master
method One : Enter the MySQL installation directory to open the MySQL profile My.ini or my.cnf find max_connections=100 Modify for max_connections=1000 service to restart MySQLRecommend the first method, the modification is more convenient.
method
The MySQL database is not installed! MySQL last step is not installed! MySQL is not installed! is not very headache, very nerve-racking, now we do not worry, small set for everyone to organize the MySQL installation failure and the MySQL
There may be duplicate records in some MySQL tables, and in some cases we allow duplicate data to exist, but sometimes we also need to delete these duplicate data.
In this section we'll show you how to prevent duplicate data from appearing in a
1.MySQL 5.5 command line inside
Copy Code code as follows:
Set global log_slow_queries = on; # Open Slow Log
Set [Session|global] long_query_time = 0.2 # setting time. Precise milliseconds
Set global
MySQL is an open source relational database management system (RDBMS), the MySQL database system uses the most commonly used database management language-Structured Query Language (SQL) for database management.
Show column from TableName;
1, MySQL down the right to run
Create a new user like MySQL
NET user MySQL Microsoft/add
net localgroup users Mysql/del
Does not belong to any group
If MySQL is installed in D:\mysql, then, give MySQL Full control of the permissions
Then in the
When you write access to MySQL database program, it is not very troublesome: a large set of functions and parameters, but also to check the results of the call, more headaches is every program to include database name, user, password, etc., want to
++++++++++++++++++++++++ processing ++++++++++++++++ on Master#1 the configuration file to add and guarantee uniqueServer-id=1Log-bin=/var/lib/mysql/mysql-bin#2 restart/etc/init.d/mysqld restart#3 Create an account rep for synchronizationGrant
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