I rookie a piece ~ ~ ~ Debugging So simple code also adjusted a day, issued to commemorate, of course, I hope to help everyone.Final String dbdriver = "Org.gjt.mm.mysql.Driver";Final String Dburl = "JDBC:MYSQL://LOCALHOST:3306/MLDN";Final String
Replication of tables Full replication: CREATE TABLE New_service select * from service;Partial copy: Create TABLE User (host char, user char (+)) Select Host,user from mysql.user where restriction condition;or create table t3 (x char, y char)
Log in to the MySQL database using the root user error 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes).Solution:1. Execute command : Service mysqld stop; stop MySQL service2. Add parameter start execution command
MySQL table operations:Insert:Insert into indicates () ....Create:CREATE TABLE User (host char, user char (16))Select Host,user from Mysql.userThe structure, fields and records of the table to be queried when creating the tableCREATE TABLE User_new1
Linux Environment:First, look at MySQL data storage path:ps-ef|grep MySQL Ii. Enter the MySQL data storage path identified above:CD var/lib/mysql (data storage path) Export Database with mysqldump command1. Export Data and table
Download mysql,http://dev.mysql.com/downloads/mysql/i download the 5.7.20
Unzip the database (the path does not have a folder that begins with the T-word), and then configure the environment variable, which is ${mysql5.7.20}/bin. Then create the
I. Connecting the databaseThere are two ways to connect, one is to use command-line arguments, and the other is to write parameter information to a configuration file1. Using parameters in the command line-u user name-p password-d database name-p
Three hosts192.168.191.106 (code 106) generate log192.168.191.107 (Code 107) implements the database where the log is stored192.168.191.173 (code 173) Implementation Log Report1. implement Rsyslog logging in MySQL (1) on 107:Yum Install
Test environment inexplicably there are several important data is deleted, because in Binlog only see is the public account deleted, unable to query who is in which time period log in, consider how to record every MySQL account login information, in
There are several types of data that represent dates and times in MySQL. Where year represents the years, date represents the dates, time represents the times, and datetime and timestamp represent dates and practices. Their comparison is as
MySQL root account, I usually use the connection is localhost or 127.0.0.1, the company's test server mysql is also localhost so I want to access inaccessible, test paused.Here's how to fix it:1, modify the table, log in to the MySQL database,
First, the installation packageDownload the MySQL installation package from the network and copy to the USB flash drive: https://dev.mysql.com/downloads/mysql/Second, mount the U disk2.1 viewing partitions Enter the command first
View query cache condition:mysql> show variables like '%query_cache% '; (Query_cache_type for on indicates already on) +------------------------- -----+----------+| Variable_name | Value |+------------------------------+----------+
String functions in MySQL
Function
Function
CONCAT (s1,s2,... sn)
Connect S1,s1...sn to a string
INSERT (STR,X,Y,INSTR)
The string str starts at the x position, and the substring of y
Mysql limit usage (recommended), mysqllimit
SELECT * FROM table name limit m, n; SELECT * FROM table LIMIT [offset,] rows;
1. m indicates Retrieving from m + 1 record row, and n indicates retrieving n data records. (M can be set to 0)
For
Code example of the Order By multi-field sorting rule in MySQL, mysqlorder
Mentioned above
A whimsy, want to know what rules mysql order by sorting is based on? Okay. If you don't have much to say, go to the topic.
MySql order by single Field
Create
Mysql 1067 error and invalid recovery after the character set is modified and restarted, mysql1067
Download the official website decompress mysql-5.6.37-winx64.zip, modify the configuration file, install the service, and use it directly;
Chinese
Detailed solution for garbled characters when connecting JDBC to mysql to process Chinese characters, jdbcmysql
How to troubleshoot Chinese garbled characters when connecting to mysql through JDBC
Recently, the integrated project needs to be
How does MySQL view metadata lock blocking? mysql metadata
How does MySQL view metadata lock blocking?
Procedure:
1. session 1 execution:
start transaction; select *from t1;
2. session 2 is executed after Step 2 is executed:
drop table
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