MySQL Common statements

MySQL daily operation Commands:1 showdatabases; View Database2 CreateDatabase test_db; Create a database named test_db3 usetest_db; Enter the test_db database. 4 showtables; See how many tables are in the database. 5 createtable test01 (ID varchar ()

MySQL Installation issues

win8.1 installation of mysql5.6 encountered problems, the main occurrence of the last step of the configuration card in the start server This step will be a long time to configure the window.Find the way online and try to solve the problem, try to

MySQL Database rules

Database column typevarchar stringBit Bohr typeint integerfloat decimalChar characterDateTime date time does not fit need to turn downText binary/string (no length limit)Relationship1. Primary key2. Self-growth column3. Foreign keyFrom the tableMain

MySQL Basic operation

MySQL Create, delete userMySQL add user, new database, user authorization, delete user, change password (note that each line followed by A; indicates that a command statement ends):1. Create a new userLog in to MySQL:@>mysql-u root-p@> PasswordTo

MySQL in the work of the accumulation

1. Convert a datetime column to a fixed format in a single piece of dataDate_format (create_date, '%y-%m-%d%T ') (Ps:create_date is a column name) results: 2016-10-17 10:37:03Parameter description:%s,%s two digits in seconds (00, 01, ..., 59)%i two

MySQL FOREIGN KEY constraint

When you delete a table or a piece of data in MySQL , it appears[ERR] 1451-cannot Delete or update a parent ROW:A FOREIGN KEY constraint fails (...)This is because the foreign Key association is set in MySQL, resulting in the inability to update or

Python3 connecting MySQL

1. Install pymysql;The 2.mac version is as follows:1 #-*-coding:utf-8-*-2 ImportPymysql3# The password I use * mosaic wow haha4conn = Pymysql.connect (host ='127.0.0.1', Unix_socket ='/tmp/mysql.sock', user ='Root', password ='******', db ='MySQL',

The optimization method of MySQL Fuzzy query--practice in person

There are more than 4W of data, but fuzzy queryVery slow to get up.1, tried to use SELECT * FROM (SELECT * From a UNION ALL SELECT * from B ... Many table union) as temptable where name like "%a%" and person_id like "%1%", found too slow.2, try to

MySQL's information_schema parsing 1

INFORMATION_SCHEMA Library is a system library provided by MySQL, which keeps the original data of the database, and makes it easy for users to monitor and manage MSYQL.Now, Nathan, the library associated with INNODB:

installation of MySQL

MySQL is a relational database management system developed by the Swedish MySQL AB company, currently owned by Oracle Corporation. MySQL is an associated database management system that keeps data in separate tables rather than putting all of the

MySQL ibdata1 File Migration

Purpose: Host system/var directory is almost full, the query is the largest file is MySQL ibdata1 file, 17G size, it is necessary to migrate this file to other directories to release the/var directory space.1. It's a good habit to back up the

MySQL Basic ④

---restore content starts---2 better git online repositories: foreign www.github.com domestic git.oschina.net (code cloud)The purpose of the remote repository is to get everyone to exchange code.1. First create a project remotelyOn-line platform

MySQL Database index simple principle

Today the main introduction of the MySQL version is 5.6, the official default InnoDB is the default storage engine, almost 99% of the scene can be used InnoDB engine.The data structure implemented by the InnoDB index engine is a B + tree, and B does

The method used by union and order by in MySQL

The Union and order by in MySQL can be used together, but there are some minor problems to be aware of in use, as illustrated by the examples below. First look at the T1 table below.1, if directly with the following SQL statement will be error:

Remote connection to MySQL

Under win system, connect someone else's MySQL or let someone else link their mysql:Open command-line cmdGo to MySQL:Mysql-u root-pMysql>use MySQL;Mysql>select host from user where user= ' root ';Mysql>grant all privileges on * * to [e-mail

MySQL can only set a self-growing field

MySQL error: There can be is only one auto column and it must is defined as a keyThe reason is that you have a field a set auto_increment, another field B is also set as the primary key, this is wrong, because MySQL will automatically grow the field

What data type does the price for MySQL represent best?

Both decimal and numeric.The decimal and numeric types are considered to be the same type in MySQL. They are used to hold values that must be of exact precision, such as currency data. When declaring columns of that type, you can (and usually want

Mybatis Learning Summary _12_mybatis+mysql Paging query

PackageCn.tsjinrong.fastfile.util;/*** @ClassName: Page * @Description: TODO (parent of pagination component, common content and logic used to encapsulate paging) *@authorZhanghaiyang * @date January 14, 2016 afternoon 12:37:55 * @Copyright ©2016

MySQL Add new user and specify database

1.CD/D version of Windows CD Linux//Switch to MySQL.exe installation location2.mysql-uroot-p Password3.use MySQL4.insert into User (Host,user,password) values (' localhost ', ' New user ', Password (' password '));5.flush privileges;6.grant all

Create function through MySQLdb, createmysqldb

Create function through MySQLdb, createmysqldb Http://stackoverflow.com/questions/745538/create-function-through-mysqldb How can I define a multi-statement function or procedure in using the MySQLdb lib in python?Example:import MySQLdbdb =

Total Pages: 3233 1 .... 2981 2982 2983 2984 2985 .... 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.