Ifnull (expr1, expr2), if expr1 is not null, ifnull () returns expr1, otherwise it returns expr2. Ifnull () returns a number or string value, depending on the context in which it is used. Mysql> select ifnull (1/0);-> 1 mysql> select ifnull ();-> 0
During database maintenance recently, data cannot be stored into the database during data parsing. The reason is that MySQL transactions have deadlocked. I restarted MySQL several times before.
Recent frequent occurrences. So find a method.
Select
Sometimes we store the largest ID in the database, and this ID is automatically added whenever there is a new record.
Create the following table:
Create Table maxidtest ('id' int (10) unsigned not null auto_increment, 'name' varchar (100) not null,
Better application availability: Online DDL/mode changesToday, Web-based applications are designed to rapidly evolve and adapt to business and production needs. When an application must quickly adapt to a new product line or product, the backend
MyISAM: This is the default type. It is based on the traditional isam type, and isam is the abbreviation of indexed sequential access method (sequential access method with indexes, it is a standard method for storing records and files. compared
After nearly one day, I finally connected to the MySQL database. Here is a brief summary:
1. Configure the MySQL database first.
2. Download the MySQL driver mysql-connector-java-5-jar and add it to the current project
Package second; import Java.
1. MySQL encapsulates a layer of MySQL net protocol on top of TCP/IP. The relationship between MySQL net package and TCP package can be one-to-many or multiple-to-one;
2. Client sending:
A) client authentication package, the authentication request
1. Introduction and configuration of mybatis + spring + MySql
Mybatis 1. Introduction and configuration of mybatis + spring + MySql
Mybatis 2. SQL statement ing file (1) resultmap
Mybatis 2. SQL statement ing file (2) addition, deletion,
An error occurred in the MySQL database today.
Got error 28 from storage engine
Check that the disk where the MySQL database file is located should be okay. it should be because the temporary directory space for the database is insufficient.
The
Open the mysqlinstallation file mysql-5.0.27-win32.zip, decompress the file, and run “setup.exe. The following interface is displayed:
Start the MySQL Installation Wizard and press "Next" to continue
Select the installation type, which has three
Source: http://bbs.mysql.cn/viewthread.php? Tid = 72 & extra = Page % 3d1% 26 filter % 3 ddigest
About Mysql Data export and version Conversion
Recently, many people have been asking about MySQL import and export, So I simply summarized some of my
Recently, I used Django to write a small website on Linux, and MySQL was used for the database. But one day, a strange problem occurred, and an error was reported:
MySQL error 2002 (hy000): Can't connect to local MySQL server through socket
1. Create a stored procedure
1. Basic Syntax:
Create procedure process name ([process parameter [,...]) procedure [feature...] process body
Example:
1. mysql> DELIMITER //
2. mysql> CREATE PROCEDURE proc1(OUT s int)
3. -> BEGIN
4.
Software name: MySQL query Browser
Introduction: I provide a mysql-gui-tools-5.0-r12-win32 integration package. MySQL query browser and MySQL administrator are included. You can set and manage them in the same way as you did in the tutorial for ease
MySQL import. SQL file and Common commands
Directly import the *. SQL script in MySQL qurey Brower. You cannot execute multiple SQL commands at a time. Execute the SQL FILE command in MySQL:
Mysql> source D:/myprogram/database/DB. SQL;
The
In the previous article, we learned how to create a database and a database table, and how to add records to a database table.
How can we retrieve data from database tables?
1. Retrieve Information from a database tableIn fact, we have used the
The following are some examples.1.1 who can connect and connect from there?
You can allow a user to connect from a specific host or a series of hosts. There is one extreme: If you know that a demotion is connected from a host, you can limit the
I originally intended to use mysqlslap of MySQL for stress testing. Unfortunately, this tool is not powerful and there are not many controllable items, especially random test statements. Use super smack instead. It seems that it is not bad.
Install1.
[Root] #/usr/bin/mysqldump-h127.0.0.1-uusername-ppassword databasename>/opt/share/1/backup. SQL
/Usr/bin/mysqldump: The program used for execution;-H: Host Name-U: Database User-P: Database PasswordDatabasename: Database Name>/Opt/share/1/backup.
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