CentOS6.5 installation configuration MySQL, the configuration method is as follows:
To install the MySQL database:# yum install-y mysql-server MySQL Mysql-deve
View Mysql-server version:# Rpm-qi Mysql-server
Initialize MySQL
Not a null constraint.The NOT NULL constraint can only be declared after the column name, cannot be declared with the constraint statement, and of course there is no way to declare the constraint name. The change field is NULL or NOT NULL only with
A workaround that MySQL cannot start under Linux2010-02-23 15:34:36| Category: UNIX | font sizeWhen I first started to learn MySQL, I brought it with Redhat. What's the start/rc.d/init.d/startThis is simple, but later, the more you learn, the system
Summary: You can query the fields separated by commas and force the sorting of the results.First look at a table:
colid
Vyear
Area
cast
, 31,32,21,12
2014
1
15
, 32,
First, the Environment preparationThe first must be the configuration development environment, which is not described in detail here for the time being.The required environment is jdk1.7,myeclipse,svn,ant, as well as the two plugins under MyEclipse
Original address: http://blog.csdn.net/gamesofsailing/article/details/21465327After successfully installing PYTHON-MYSQL, start configuring the Django MySQL connection configurationOpen the setting.py file under the Django Project and change the
For MySQL databases , you must use the INNODB engine If you want to use transactions and row-level locks. If you want to use full-text indexing, you must use MyISAM. InnoDB is more practical, safer, more stable but less efficient than MyISAM, but
MySQL Monitoring management tool--innotop1.innotop InstallationReference official website: http://innotop.googlecode.com/svn/html/installing.html# wget http://innotop.googlecode.com/files/innotop-1.9.0.tar.gz# TAR-ZXVF Innotop-1.9.0.tar.gz# CD
1. Create a databaseCREATE TABLE News (ID INT () not NULL auto_increment PRIMARY KEY, title VARCHAR (), dates date,connects text,hits INT (one) not NULL) ENGINE = INNODB DEFAULT CHARSET = UTF8 auto_increment =12. Connecting Database conn.php3. Set
Basically solved by index.Usually the index key is in where, group by, and order by related columnsOnly one index can be used for a table (when querying)So it's best to use a federated index when you want to execute a complex query, which is index
The execution plan for the fur MySQL optimizer is not accurate at all times, not optimal (Cpu+io)???There are too many factors:The existence of INFORMATION_SCHEMA information is regularly refreshed, many times is not the most true, or even big
Install Mysql-essential-5.1.36-win32.msi (2009), too lazy to download new.During installation, the previously installed phpedit constituted interference, and its license expired and could not be found. Uninstall Phpedit, reinstall, result start
MySQL View table structure commandShow columns from table name;1, copy table structure and data to new Table CREATE table new Table select * from the old table This method will copy all the contents of oldtable, of course, we can use delete from
Select fdate,fminute,ftotal,ft200, (ft200+0.0)/ftotal from t_switch_155 ORDER by FDate asc,fminute ASC to outfile ' 15 5.txt ';Then open with Notepad, you can see the whole. If you open with txt, a newline character may not exist.If TXT has a string
There are quite a few libraries connected to MySQL on Python 2.x, the more famous of which is MySQLdb (the Django project uses it; I also used it when developing test systems), see: http://sourceforge.net/projects/mysql-python/However, at present
1. For tables using the MyISAM storage engine, use optimize table table_name to defragment the tables regularly.2. For fields with high precision, use the decimal field type and try not to use the Float field type. Float is automatically rounded at
In the deployment of the project to find two problems, the first problem is not too easy to find, because I deploy the time is not a problem, but the product's colleagues in the run process is always a connetexception abnormal look at a long time
Mysql got the unix time idea and code 60 days ago, mysqlunix
Select UNIX_TIMESTAMP (ADDDATE (NOW (), INTERVAL-60 DAY ))
Obtain the current time based on now ().
Use the adddate () method to obtain the time 60 days ago
Use unix_timestamp () to
How to execute dynamic SQL statements in MySQL stored procedures
Drop PROCEDURE if exists my_procedure; create PROCEDURE my_procedure () BEGIN declare my_sqll varchar (500); set my_sqll = 'select * from aa_list '; set @ ms = my_sqll; PREPARE s1
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