We create a mysql.js (like the great gods, call this a module and then expose an interface) to connect to the databasevar connction ={};Connction.mysql = {Host: "localhost",//This is the address of the databaseUser: "Root",//username
1, query numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=2. Query stringSELECT * from tb_stu WHERE sname = ' Xiao Liu 'SELECT * from Tb_stu WHERE sname like ' Liu 'SELECT * from Tb_stu WHERE sname like '% Programmer '
First, query numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=Second, query stringSELECT * from tb_stu WHERE sname = ' Xiao Liu 'SELECT * from Tb_stu WHERE sname like ' Liu 'SELECT * from Tb_stu WHERE sname like '%
1. Build a tabletest_datefor the self-growth of the date, only one column inside .ID, write a store, insert sequential numbersBegin#routine body goes here...declare ID int;set id=1;while id 2. Create a Time dimension table, insert a record set
Failure phenomena:MySQL cannot start1:DMESG |grep MySQL[101353.820000] init:mysql Post-start process (9077) terminated with status 1[101354.650000] init:mysql main process (9113) terminated with status 1[101354.650000] Init:mysql respawning too fast,
Create a user?
1
CREATEUSER ‘username‘@‘host‘ IDENTIFIED BY‘password‘;
Descriptionusername– the user name you will createhost– specifies on which host the user can log on, if localhost is available to the local user,
Type name
Description
Storage requirements
BIT (M)
Bit field type
Approx. (m+7)/8 bytes
BINARY (M)
Fixed-length binary string
M bytes
VARBINARY (M)
Variable-length binary
Chapter i Mysql Introduction and Installation and configuration · section I:Mysql Introduction
MySQL is a relational database management system , by Sweden MySQL AB company Development, currently belongs to Oracle -owned products.
PrefaceThe database storage Engine is the database's underlying software organization, and the Database management system (DBMS) uses the data engine to create, query, update, and delete data. Different storage engines provide different storage
Essentially, you set up a Yum source, and then Yum installs it.However, there are two ways to add a Yum source, one is to create a new/etc/yum.repos.d/mysql-community.repo, and the other is to install the Yum source using the RPM package provided by
Official Document: Https://docs.saltstack.com/en/2016.3/ref/returners/all/salt.returners.mysql.html#module-salt.returners.mysqlMySQL builds itselfThe first thing to do is create a database on the master machinecreate database ' Salt '
Open & Edit/etc/my.cnf
Add skip-grant-tables under[mysqld]
Restart Mysql
You should is able to login to MySQL now using the below commandmysql -u root -p
Runmysql> flush privileges;
Set New Password byALTER USER ‘root‘@‘localhost‘
Using Percona to monitor a databaseNeed. PHP php-mysql and this package belowDownload packagewget https://mirrors.tuna.tsinghua.edu.cn/percona/yum/el7/percona-zabbix-templates-1.1.7-2.noarch.rpm Yum Install -Y php Php-mysqlInstallation[Email
What is an ORDER by injectionThe content discussed in this article refers to the controllable position order by after the clause, the following order parameter can be controlled"select * from goods order by $_GET[‘order‘]"Simple injection judgmentIn
Master-master replication (dual-master slave) for building a MySql Cluster
The previous article introduced how to configure master-slave replication for MySQL. This article mainly describes master-slave replication:
First, describe the keywords
How to reset the initial values of auto-increment columns in a MySQL table
How to reset the initial values of auto-increment columns in a MySQL table
1. Question proposal
In MySQL database design, auto-increment numeric columns are generally
Mysql acquires datetime-type data, followed by A. 0 implementation method, datetime.0
The data type of mysql is datetime, and the data stored in the database is 05:02:02. Uploaded to java becomes 05:02:02. 0, with an additional tail. 0,
You can
Summary of special SQL statements for mysql (mandatory), mysqlsql
1,Update the entire table. If the value of a column in a row of data is null, make it equal to the value of another field.
UPDATE ot_tgbz set update_day=if(update_day is
Mysql 5.7.17 winx64 installation and configuration tutorial, 5.7.17winx64
Today, I installed the MySQL database on my computer again. Every time you reinstall the system, you have to reinstall the database, but every time you have to refer to
Database-four features of transactions and four features of databases
1. What is a transaction?A transaction is a series of strict operations in an application. All operations must be completed successfully. Otherwise, all changes made in each
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