Store function: To return a result to the caller, the result can be used in an expression like (Hex (), cast (), cos () function)A stored procedure, called with a call () statement, is a separate procedure that cannot be used in a functionSummary of
1. Turn on MySQL remote access permission to allow remote connectionsMysql-uroot-pExecute the following command:Grant all privileges on * * to ' root ' @ ' 192.168.0.1 ' identified by ' Root-password ';Flush privileges;Exit192.168.0.1 is the IP of
After MySQL master-slave, in order to two (or more) machines to make full use of the need to read and write separation highlighted. Advantages and disadvantages Here is not the focus of the discussion!There are three ways to read and write MySQL:1.
Received MySQL Master interrupt alarm mail, immediately boarded the server to view, found that the trunk log corruption.Show slave status\g, prompt for trunk log corruption, according to previous practice, as prompted to re-specify the appropriate
1. View Current user permissionsSelect Host,password, user from user;2, the userCreate userInsert into Mysql.user (host,user,password,ssl_cipher,x509_issuer,x509_subject) VALUES ("Host", "User", Password (" Password "), ', ', ', ');(host indicates
Typically, when maintaining a database, it involves the backup and restore operations of the databaseIn the MySQL database under Windows, we can use the Mysqldump.exe command to do the backup, the command is as followsIn the bin directory of MySQL,
Stored ProceduresThe SQL statements that we commonly use to manipulate database languages need to be compiled and executed at the time of execution, while stored procedures (Stored Procedure) are a set of a set of SQL statements, compiled and
The replace operation is similar to insert. There is only one exception, if an old record in the table is used with a primaryA new record of key or a unique index has the same value, and the old record is deleted before the new record is
A database is a critical part of a high availability project in which customers need to be highly available. Many of MySQL's high-availability studies have been made, with more MySQL cluster and MySQL master-slave replication.MySQL cluster is too
MySQL Add user, delete user, authorization, change password and so on MySQL add user, new database, user authorization, delete user, change password1. Create a new user. Log in to MySQL@>mysql-u root-p@> PasswordCreate usermysql> mysql> INSERT INTO
MySQL includes support for triggers. A trigger is a database object associated with a table operation that invokes the execution of a trigger on a table when a specified event occurs on the table on which the trigger is located.Create a TriggerIn
Http://www.silverlightchina.net/html/tips/2009/1210/384.htmlSqlDataAdapter usageQ: What is DataAdapter?A: The DataAdapter object acts as a bridge between the dataset and the dataString strconn= "uid= account; pwd= password; database= database;
MYSQL master-slave synchronization configuration for CentOS
1. Both the master and salver close the firewall iptables and execute the service iptables stop command:
Set SELINUX = disabled for The SELINUX file ,:
2. Create a database
Log on to
MySQL function GROUP_CONCAT, mysqlgroup_concat
This function returns a string with a non-NULL value from a group of connections. This function is an enhanced basic LIST () function supported by Sybase SQL Anywhere.
Syntax
How to automatically back up MySQL in Linux, and how to back up mysql in linux
In Linux, you can use the crontab system to regularly back up MySQL databases on a daily basis. The detailed steps are as follows:
1. Create the path to save the backup
Mysql encounters an error similar to "Everyderivedtablemusthaveitsownalias"
Every derived table must have its own alias
This statement means that each derived table must have its own Alias.
This error occurs when multiple tables are queried.
The
What should I do if I forget the root password on windows ?, Platform root
1. Open the MySQL configuration file my. ini and add skip-grant-tables to the end of the file or add it to the [mysqld.
2. Restart the MYSQL service.
In windows:Net stop
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