First, create a stored procedureCreate a stored procedure (a)' Hello world '; END; // Execute stored procedure call Proc1 ();Basic form of creating stored procedures| Out | InOut] Param_name typecharacteristic parameter has multiple values: LANGUAGE
MySQL garbled problem:What happens: When you use the command line to view database data, the Chinese language is displayed as garbled.Error when inserting Chinese data with command line.Solution Ideas:1, enter at the command line: [Show variables
The easiest problem to find and solve for troubleshooting a performance bottleneck is MySQL's slow query and the queries that are not indexed.=========================================================Method One: This method I am using, hehe, compare
SELECT * from EMP; #注释#---------------------------#----The command line to connect to MySQL---------#启动mysql服务器net start MySQL#关闭net stop MySQL#进入Mysql-h host Address-u user name-P user Password#退出Exit#---------------------------#----MySQL User
Problem Description: Do the master and slave of MySQL, have not the decision from separation, cause colleague in MySQL from server performed write operation, cause out of sync (show slave status\g;slave_sql_running:no)Workaround:1,Mysql > Slave stop;
1. View the current session isolation levelSELECT @ @tx_isolation;2. View the current isolation level of the systemSELECT @ @global. tx_isolation;3. Set the current session isolation levelSet session transaction Isolatin level repeatable read;4. Set
The field of a table has id,uid,name, where ID is self-increment,CREATE TRIGGER trigger_insert_productAfter INSERT on aFor each ROWBEGINInsert into B (uid,name)Select New.id as db_goods_id,New.uid, New.name;ENDThe above trigger when the Insert event
Inserting data using Insert
Insert a full line
Insert part of a row
Inserting multiple lines
Insert the results of some queries
Insert the full line first look at the original customer list:Insert one line: INSERT into
Update and delete operations The SQL statement is relatively simple, but note that when using update, pay attention to the Weher condition limit, the following statement is to update only the email address of ID 10005, if not with the WHERE
use show processlist to see why: The use of a trigger to constantly delete the log, to ensure that each user's log only 10 removed, the CPU utilization rate from table name view and SQL comparison to isolate the root cause: There is an index in
1, this is relatively simple: in the phpMyAdmin has provided650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/6B/wKiom1PaXc3AwjhsAAH4kuIwJcU151.jpg "title=" 1.jpg " alt= "Wkiom1paxc3awjhsaah4kuiwjcu151.jpg"/>2. When the table is designed
Because of business needs, a batch of MySQL data needs to be imported into hbase, and data is now exported from MySQL to HDFs.Version: Hadoop cdh4.5,hbase-0.9461. Entity classYqbean is my entity class, please modify it according to your needs, the
A MySQL database was recently installed on Linux, but the remote connection to MySQL always reported Erro 2003:can ' t connect to MySQL server on ' 211.87.***.*** ' (111), It took several hours yesterday to find the solution, as follows:1.sudo gedit/
MySQL connection to the server from the client is not connected to the problem of the company to use MySQL to do a test, began to build a MySQL database in their own local program to connect again, did not encounter a problem connected.This time the
Remote connection to mysql: [1130, mysql: 1130]
The following error is returned when you remotely connect to mysql:
1130 -host 'localhost' is not allowed to connect to this mysql server
Solution
Log on to mysql with the root account locally,
Clear the mysql query cache.
When optimizing an SQL statement, it is found that the originally slow SQL statement (nearly 1 minute) is completed instantly at the second run (0.00sec)
This is because mysql caches the same SQL statement. The server
Enable remote logon for mysql
Sometimes, because the database and website are placed in different IP Addresses During website construction, mysql needs to be remotely connected using a program, while mysql is secure, by default, you cannot connect
MySQL inserts the data queried in Table a into Table B.
MySQL inserts the data queried in Table a into Table B.
If table B exists
1
insert into B select * from;
If table B does not exist
1
Fully uninstall mysql (stop the service, uninstall related programs, delete the registry, and uninstall mysql)
1. Stop MySQL Service
2. uninstall mysql-related programs
3. Delete the Registry (run-> regedit), machine-> system->
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