Mysql optimization ideas
Optimization and optimization:
1. database design and planning-it will be difficult to fix it later, estimate the data volume and what storage engine to use
2. data application-how to retrieve data and
Deploy a Mysql Cluster in a highly available mysqlgalera cluster
I. INTRODUCTION to cluster machinesFour machines:1. install haproxy and keepalived on the balance nodeMachine name:Balance01 172.18.48.1Balance02 172.18.48.22. install mysql database
In Linux, forget the MySQL password. 1. First, check that the server is in a safe state, that is, no one can connect to the MySQL database.
Because, during the resetting of the MySQL root password, the MySQL database is completely out of
Usemysqldenied in mysql
Mysql-u root-p prompt:
Mysqladmin: create database failed; error: 'Access denied for user' '@ 'localhost' to database 'cacti''
The reason is that the mysql password is incorrect.
Anonymous mysql users can access the
Graduation design record (3) mysql SQL statements because of time problems, do not have time to find all SQL statements, will not be found online in a timely manner. Below I will summarize my problems:
First, let us know that, especially those who
I have used the following backup methods for MYSQL backup:
Mysqldump,
Mysqlhotcopy,
Backup table,
SELECTOUTFILE,
Or back up binary logs (binlog ),
You can also directly copy data files and related configuration files.
MyISAMTables are saved
MYSQL backup methods
MysqlDatabase
BackupThere are four main methods:
1. mysqldump2. direct copy (cp, tar, gzip, cpio)3. sqlhotcopy4. synchronous replication
1. mysqldump backup:
Mysqldump generates text files that can be transplanted to other
Go-mysql: an easy-to-use mysql interface framework
Go-mysql is a mysql driver written in go. The interface is similar to the database SQL of go, but it is slightly different. Currently, it cannot be integrated into go database/SQL, however, the
MySQL password reset Method 1:
Add the following to the [mysqld] field of my. ini:
Skip-grant-tables
Restart the mysql service. mysql can log on to the database without a password.
Then go to mysql
Mysql> use mysql;
Mysql> Update user set
Mysql backup and recovery I. backup
MySQL backup is mainly divided into logical backup and physical backup;
Considerations for backup or recovery:
1. determine whether the storage engine of the table to be backed up is transactional or
How to View binlog data of MySQL
Binlog is a binary log that records all changes in the database.
When the SQL statement execution of the database is changed, a record will be written at the end of the binlog, and the statement parser will be
Add users to mysql
First:
Add a user named "test1" with the password "abc" so that he can log on to any host and have the permission to query, insert, modify, and delete all databases. First, use the root user to connect to MYSQL, and then type the
Mysql User authorization is meaningless.
1. Authorization
-- Authorize an app user to access the database from a specified IP address
Grant all privileges on *. * to 'app' @ '10. 200.12.20.'identified by 'app1234 ';
-- Cancel authorization
Install MySQL in python-python
1. first download mysql for python,: http://sourceforge.net/projects/mysql-python/
2. decompress the package, enter the directory, and then execute:
python setup.py buildpython setup.py install
Run: During
MySQL security management 1. create a user
Create user linda identified by 'Linda'
2. View permissions
Show grants for linda
3. grant permissions
Grant select on demo. * to linda
4. change the password
Set password for linda =
Mysql multi-table join query efficiency analysis and optimization 1. multi-table join type
1. Cartesian product (cross join)In MySQL, you can think of cross join or omit CROSS as JOIN, or use ',' for example:
[SQL]View plain copy print?
SELECT
Solve the problem of mysql "Accessdeniedforuseramp; apos; rootamp; apos; @ amp; apos; localhostamp; apos; "Solve mysql" Access denied for user 'root' @ 'localhost' ". my system is ubuntu6.06. when a newly installed mysql enters the mysql tool, there
Deprecated: mysql_connect (): Themysqlextensioni reason:
Php 5 versions: 5.2, 5.3, 5.4, and 5.5. for fear of keeping up with the times, the new server directly goes to 5.5, but the program has the following error: Deprecated: mysql_connect (): the
What is LockReading in MySQL?
To put it bluntly, it is to lock the corresponding data while querying, so as to maintain the integrity of things.Two Locking Reading forms
SELECT... LOCK IN SHARE MODE: Add a read/write lock to the data during query.
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