First, overview:MySQL database master-slave configuration, the normal situation of all the database read and write operations on the main database, from the database only as a data backup use, obviously can not effectively use the server resources,
MySQL default root user does not have password, enter mysql–u root to enter MySQL1. Initialize root passwordGo to MySQL Database
1
mysql>updateuser set password=PASSWORD(‘123456’) whereUser=‘root‘;
2, allow MySQL
To initialize MySQL, change the location of the data file:[Email protected]:/lvmdata# mkdir data[email protected]:/lvmdata# chown-r mysql:mysql/lvmdata/dataTo modify the MySQL configuration file:DataDir =/lvmdata/dataThen initialize:[Email protected]
PartitionPartitioning is the distribution of files and indexes of a data table in different physical files.The types of partitions supported by MySQL include range, List, Hash, Key, where range is more commonly used:Range partition : Assigns
1. Check if the system comes with MySQL installed yum list installed | grep mysql2. Delete the system's own MySQL and its dependenciesyum -y remove mysql-libs.x86_643. Add the RPM source to CentOS and select a newer sourcewget
A system parameter for MySQL: Max_allowed_packet, whose default value is 1048576 (1M),Enquiry: Show VARIABLES like '%max_allowed_packet% ';Modify the value of this variable: "Max_allowed_packet = 1M" In the [Mysqld] section of the My.ini file in the
Installing MySQL on Ubuntu is very simple and requires just a few commands to complete.1. sudo apt-get install mysql-server 2. Apt-get Isntall mysql-client 3. sudo apt-get install Libmysqlclient-dev the installation process will prompt to set a
The two are different under Linux and under Windows, under Linux is not differentiated under Windows.The main difference isSingle quotation marks (') or double quotation marks are used primarily for string reference symbolsSuch as:mysql> Select '
#####################################MySQL Database master-Slave synchronizationMaster-Slave synchronization: Let other database servers automatically synchronize data on the database server that is serving the service. Building Master-Slave
1. Newly opened cloud server, need to detect whether the system comes with the installation of MySQL# yum list installed | grep mysql2. If you find a system that comes with MySQL, do it decisively# yum -y remove mysql-libs.x86_643. Wherever you
Mha,mysql High-availability architecture, in a master-slave architecture-based mode, when the primary server is hung up, the MHA manager decides from which slave to choose from the server as Master master, which is usually compared to the data from
Recently deployed applications on the server are suddenly not connected to the MySQL database, error "error 1130:host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server"Then run the following command directly:mysql -u root -pPop-up Enter
Data and databases1. Data : Symbolic representation of objective things.2. storage Media : paper, disc, disk, U disk, cloud disk ...3. purpose of Storage : Search (query)The amount of data stored increases the difficulty of retrieval.4. database (db:
Original: http://www.jb51.net/article/39454.htmMethod 1: Use the Set password commandFirst log in to MySQL.Format:mysql> set password for user name @localhost = password (' new password ');Example:mysql> set password for [email protected] = password
A simple segmentation statistic problem: Student table {id,name,score} field, counting the number of people in each score segment. Rule: 60 fail, 60-80 good, 80-100 excellent.SELECTSUM (case if scoreSUM (case if score>=60 and scoreSUM (case if score>
1. Create a databaseCreate DatabaseVueblog; Usevueblog;/* Create administrator table for background login, field for admin number (self-growth), account, password, logon time * /Create Table if not existsAdmin (IDintAuto_incrementPrimary Key,
Code: Description: Because I do not have the database installed, the database is remote access, so the address is not localhost# __author__ = ' STEVEN ' Import pymysqlhost = ' 10.1.1.136 ' port = 3306name = ' root ' pwd = ' root ' db = ' pythondb '
1, prevent XSS attacksdatabase query data operation, in order to prevent injection, to execute the parameterized query, that is, directly using execute directly to execute SQL statement, because Exexute itself has received the parameter bits of the
Modify the binlog location of mysql and mysqlbinlog
For the mysql service installed in the latest project, the allocated disk space is too small, so that binlog can be fully occupied in two days. The processing method is recorded here.
Mysql
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