The judgment of NULL in MySQL

MySQL>Deletefromwhere x='NULL';Query OK,0Rows Affected (0.00sec) MySQL> Delete from' Zhangchao 'whereX=NULL; Query OK,0Rows Affected (0.00sec) MySQL> Select * fromZhangchao;+------+-------+|X|Y|+------+-------+|Xxx|yyy|| NULL | NULL

MY.CNF configuration files and parameters for MySQL

[Mysqld]Port = 3306ServerID = 1Socket =/tmp/mysql. sockskip-locking Avoid the external locking of MySQL and reduce the chance of error to enhance stability.Skip-name-resolveDisable MySQL for DNS resolution of external connections, and Use this

Set up MySQL to allow extranet access

1. Modify the configuration filesudo vim/etc/mysql/my.cnfChange the value of the bind-address parameter to your internal/external network IP or 0.0.0.0, or comment out the line directly.2. Log in to the databaseMysql-u root-pEnter passwordmysql> use

Functions and meta-data of MySQL stored procedures

1. Create a function1 CREATEFUNCTIONFactorial (nDECIMAL(3,0))      2 RETURNSDECIMAL( -,0)3 Deterministic4 BEGIN  5DECLAREFactorialDECIMAL( -,0)DEFAULT1;6DECLARECounterDECIMAL(3,0);7SETCounter=N; 8 factorial_loop:repeat9

MySQL Learning Note (4)-Creating a database

1. Create a simple database1 CREATE DATABASE t1;If the image is not hit, the system waits until the user enters the Terminator before the line statement.2. View the list of databases under the current server1 DATABASES;Must be databases, the last s

Export and import operation of MySQL under Linux

One, backup and import of database1), Backup of the database1. Export the entire databaseMysqldump-u user name-p database name > exported file nameExample: Mysqldump-u dbadmin-p myblog >/home/zhangy/blog/database_bak/myblog.sql2. Export a

MySQL Online DDL

The InnoDB engine is currently using the following steps to perform DDL:1 Create a new non-visible temporary table (tmp_table) According to the table structure and DDL statements of the original table (original_table)2 Add write lock on the original

MySQL Startup and shutdown

1. Normal start/etc/init.d/mysqld startThis mysqld is a copy of the Mysql.server in the installation package , as followsCP Support-files/mysql.server/etc/init.d/mysqldSee if the port is upNETSTAT-NULTP |grep 3306To see if there are related

MySQL Stored procedure Example 1

Delimiter//drop procedure if exists p_prelogin//create procedure P_prelogin (in In_username varchar (+), in In_password varchar (+), in In_asshkey varchar (on in_usshkey varchar), in In_gameid tinyint, In_logintype tinyint) Proc_la Bel:begindeclare

How MySQL modifies all the Definer

What is definer in MySQL and what is the role?We will define a definer= ' xxx ' when MySQL creates view, trigger, function, procedure, event, similar to the following:CREATEalgorithm=UNDEFINED Definer=' Root ' @ '%`SQL SECURITY DefinerVIEW' V_

MySQL change root password, set IP access

Change Password:  Method 1: Use the Set password commandMysql-u Rootmysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');Method 2: Use Mysqladminmysqladmin-u root Password "Newpass"If Root has already set a password, use the

MySQL server has gone away error

1. Recently did insert database, then always reported a mistake. MySQL server has gone away. (e.g.)Looked up a lot of information, finally solved.1. The connection timeout may be: Enter php.ini and modify the value of Wait_timeout. Some versions may

"Go" [MySQL] Linux MySQL log special

Original link: http://blog.csdn.net/xiaoxu0123/article/details/62585381. Set the directory to be stored:[Email protected] etc]# MORE/ETC/MY.CNF[Mysqld]# # #此处省略N个字Log-error=/var/log/mysql/mysql_error.log #错误日志Log=/var/log/mysql/mysql.log # # #最好注释掉,

MySQL GROUP BY data grouping--traps

GROUP byThe group BY keyword is used in MySQL to group one or some field queries and returns the first of the duplicate records.Grammar:SELECT column,... From Tb_name GROUP by column1,column2 ...The user table is logged as follows: UID

MySQL recovers database from SQL store files garbled

Scenario One:A computer on the export of SQL files to another computer to recover the database, Chinese characters are all garbled, and then there may be some data hint extra long.Scenario Two:The SQL file you get is not the original export SQL file,

MySQL table name capitalization issues under Windows and Linux

MySQL is case-insensitive under Windows, and the table name is automatically converted to lowercase when the script file is imported into MySQL, resulting in an error when you want to put the database export into use on a Linux server. Because the

JDBC Connection MySQL

Test.javaImport Java.sql.drivermanager;import java.sql.resultset;import java.sql.sqlexception;import java.sql.Connection; Import Java.sql.statement;public class Test {static Connection con;//Declare Connection object static Statement SQL;//DECLARE

Linux CentOS 6.5 Operating environment modify MySQL database password

The modified users are listed as root.first, the root of the original myql password;Method One:Outside the MySQL system, use the Mysqladmin#mysqladmin-u root-p Password "test123"Enter Password: "Enter the original password"Method Two:By logging into

MYSQL Master server Configuration

MySQL server master and slave configuration, originally is a very simple thing, helpless not from scratch, always in someone else already installed MySQL server above, this will involve, MySQL version, startup files, and so on some problems.But

MySQL Backup restore command

1. Fully preparedMysqldump-u root-padmin--single-transaction--events--triggers--routines--all-databases > all-databases-' Date +% F '. sql2. Full-Backup RestoreSOURCE all-databases-' Date +%f '. sql3. Sub-Library PreparationMysqldump-u

Total Pages: 3233 1 .... 2021 2022 2023 2024 2025 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.