Some time ago, a rather senior programmer asked me what is called the index, I am very surprised, I think this will not be bucket, because there are thousands of developers (probably mostly using MySQL) have not received the formal training of the
1. Create a new user.//log in to MySQL@>mysql-u root-p@> Password//Create usermysql> INSERT INTO Mysql.user (Host,user,password) VALUES ("localhost", "abc", Password ("1234"));//Refresh System Permissions TableMysql>flush privileges;This creates a
1. MyISAM and the InnoDB's choice. MyISAM with a table lock, InnoDB with a row lock.MyISAM write priority, the table will be locked when the write operation. InnoDB a lock line when writing operations. So if the write operation is more frequent
1. A simple example1.1. Create a table:CREATE TABLE T (S1 integer);1.2. Trigger:
delimiter | create trigger t_trigger before insert on t for each row begin set @x = "Hello trigger" set new.s1 =; end |
First, prefaceMysql replication as a read-write separation of the cheap solution, support a master multi-standby way of data storage, the use of binary log shipping, there is a wide range of applications, online related concepts are more, no longer
Mysqldump backup mechanism: Through a given parameter information and system table data, a table to get the data and INSERT statements inserted into the backup file, so because of inconsistent time, will result in inconsistent data, but for a system
For example:There is a Type field in the article table, he stores the article type, there are 1 headlines, 2 recommended, 3 hot, 4 graphics ..... 11,12,13, wait.Now there is an article he is a headline, but also hot, or graphic,The type is stored in
I. MySQL build processInstall MySQL on Ubuntu1, sudo apt-get install Mysql-server2, sudo apt-get install mysql-client3, sudo apt-get install Libmysqlclient-devII. Basic Command-----login, exit, add a database, add a table, delete a database, delete
Here first thanks to the comrade who has given the solution on the InternetThere are a lot of MySQL database beginners may encounter a change in the name of the word, maybe everyone will think of the first time to search the Internet, in fact, I am
Set environment variable path, point to the bin directory under MySQL
Modify the My-default.ini under MySQLBasedir=%mysql_home%Datadir=%mysql_home%\data
To the MySQL bin directory to executeMysqld--install(Delete Service is MySQL--remove)PS:
From_unixtime (unix_timestamp, format) converts the timestamp to the specified format As:select from_unixtime (addtime, '%y-%m-%d%h:%i:%s ') as DateTime From Table1unix_timestamp ([datetime]) converts datetime to timestamp as:select from_unixtime
MySQL version: 5.5The notebook is dead again, only the screen is alive, it should be the memory disk problem. In short, I opened the MySQL service and forced shutdown, when the computer opened again, the MySQL service failed to start.First look at
Compile and install MySQL5.5.x in Linux source code
Linux: CentOS 6.5
MySQL version: 5.5.20, attached: [Click to download]
1. Install cmake
MySQL 5.5 and later versions have been replaced by the cmake tool./configure compilation and configuration
10. mysql Import and Export DatabaseImport and Export mysql database commands in linux1. Use the mysqldump command to export the database
(Note: If this command is not available, run this command in the mysql installation path ):1. Export data and
Tracking of MySQL master-slave synchronization inconsistency caused by Character Set Issues
A new feature is coming soon. After data is filled in, the master-slave synchronization stops. The following error is reported:
Error 'Duplicate entry '66310
Change the MySQL database name and MySQL Database Name
First, I would like to thank the online comrade who has provided a solution.
Many beginners of MySQL Databases may encounter a problem about renaming. You may think of searching on the
MySQL database backup and recovery methodsMySQL database backup and recovery methodsMysql-uroot-pShow databases;1. Export the database1). MySQL command line to export the entire database (including data)The exported files are stored in the mysql \
[Problem description] ImportErrorNomodulenamedMySQLdb Solution
1. Check whether the MySQLdb module has been installed.
Go to the python command line and enter import MySQLdb. If no error is reported, it indicates that this module has been
Install mysql-proxy on centos
Mysql-proxy is useless. mysql-proxy depends on libevent, lua, glib2, and other software.
So before installation
Yum install lua-develyum install glib2-devel
Libevent I use source code to install,DownloadedLibevent-1.
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