Package Pubcls;
Import java.sql.*;
/**
* MYSQL simple Operation class
* @author Itblt
*/
Public class Mysql
{
Public Connection Livecon = NULL ;
Public int dbwaittime = 3600;
Public String DbLang = "" ;
Brief introduction:
MySQL's binary log can be said or MySQL's most important log, it records all the DDL and DML (in addition to the data query statement) statements, as an event record, but also contains the statement of the consumption of time,
Configure master-Slave synchronization of MySQL database (one master and one slave)
First, the main library to open Binlog, Server-id
[Root@master-mysql ~]# grep-e "Server-id|log-bin"/etc/my.cnfLog-bin =/usr/local/mysql/data/mysql-binServer-id =
Your page is completely FREE!
Now, you can have your own cyberspace in a quick and easy way. Your Web page will be available to millions of internet users in a few minutes.
The function of the network space:
We give each network space 100.00 MB.
Native support Zlib component library, GD Library and. htaccess pseudo static, etc., to ensure that most PHP programs run normally. Home virtual host mainly provided to Emer to build personal blog or to carry out related matters. The following is
Method One
Specific codeBackup
The code is as follows
Copy Code
@echo Off & setlocal enableextensions ::----------Configuration Items---------- :: Backup placement path, plusSet Backup_path=d:backup :: Database name to
The code is as follows
Copy Code
Update ' table_name ' SET ' field_name ' = replace (' Field_name ', ' from_str ', ' to_str ') Where ' field_name ' like '%from_str% '
Description
table_name--the name of the tablefield_name-
Restore the MySQL database tutorial log files
If the MySQL server has binary logs enabled, you can use the MySQL tutorial Binlog tool to recover data starting at a specified point in time (for example, from your last backup) until now or another
Can t connect to MySQL tutorial server on workaround
Error Number: 2003
Problem Analysis:
Unable to connect to the MySQL server, as possible:
1, the MySQL service does not start, generally in the case of the exception of MySQL can not start,
1, one way is to set the table or row collation, so that it is binary or case sensitive. In the MySQL tutorial, the naming method for column collate its conventions is as follows:
*_bin: Binary case sensitive collation, which means case-sensitive.*_
MySQL tutorial administrator pops up "could not find settings" error
FIX: Just put the Hkey_local_machinesystemcurrentcontrolsetservicesmysqlimagepath in the registryThe value is changed from C:mysqlbinmysqld.exe MySQL to
Scripts are placed in the/home/user/mysql tutorial _backup.sh
Crontab
# crontab-l
# m H Dom Mon Dow command
* * */home/user/mysql_backup.sh
The script is as follows
#!/bin/sh
# mysql_backup.sh:backup MySQL databases and keep newest 5 days
MySQL tutorial limit usage and MySQL limit optimization/*MySQL limit usage November 08, 2007 14:291. SELECT * FROM tablename limit 100,15
Start with 100 records after 15 (the actual fetch is 第101-115条 data)
2. Select * FROM tablename limit 100,-1
This article mainly describes the practical application of MySQL rounding, as well as the precautions worth attention in its actual operations and the description of its actual application code. The following is a detailed description of the main
Reduce access to Mysql1. Avoid repeated searches for the same data:The application needs to clearly understand the access logic of the database and access to the same table. Try to concentrate on the same SQL access and extract results at a time to
Create a database tableIt is too common to create a database table. If you use a database, you can use the create statement to create a database table. See the following syntax:Create table tbl_name (create_definition,...) [type =
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