1. Tools:Two machinesmaster:192.168.0.1slave:192.168.0.22, the master configurationFind MySQL config file, General CentOS is/etc/my.cnf,ubuntu is/etc/mysql/mysql.conf.d/mysqld.cnfSkip to configuration under [Mysqld]# can be commented # unique Node
1. Configuration fieldsConfigure database fields in the setting file: The database needs to be created manually in advance: statements (CREATE DATABASE TestDB charset "UTF8";)1DATABASES = {2 'default': {3
Set up MySQL to allow external IP connectionsAfter the MySQL installation is successful, the MySQL database can be accessed locally by default. If other computers need access to the MySQL database, they need to be granted access.Operation Steps:
Numeric type Integer typeWhen the inserted value exceeds the range of the type, only the maximum range value is retained.Whether the constraint type is signed or unsigned:
The default integer type is the signed number.
Specify unsigned
Database summary--mysql Common face questionsMarch 24, 2015 17:56:06Hits: 77871. According to the department number from high to low, wages from low to high list of employee informationSELECT * FROM Employee ORDER by dept_id Desc,salaryThe
The mysql_connect () function locally creates a connection to the MySQL server/*/$link = mysql_connect (' localhost ', ' root ', ') or Die (' cannot connect to the database server!) The database may not be started. or the user name password is wrong!
Install MySQL1. Uninstall the old versionUse the following command to check if MySQL Server is installed we found the result:[[email protected] ~]# rpm -qa | grep mysqlmysql-libs-5.1.73-7.el6.x86_64Some words are unloaded by the following commandrpm
MySQL will use the log when troubleshooting, optimizationError log, query log, slow query log, binary logFind log files First, Linux generally in/ETC/MY.CNFOpen to seelog-error=/webserver/logs/mysql/error.log#log=/webserver/logs/mysql/mysql.loglog-
Degree from strong to weak1. DROP table TB Drop Delete table directly, no way back 2, truncate (table) TB Delete all data in the table, cannot be used with where 3, delete from TB (where) deleted The difference between the data in a table (a row can
The previous article on the basic installation, this is counted as the advanced barLink Linux install MySQL (1)1. Prepare the MySQL RPM installation package2. Unzip and enter Usr/local/mysql3. Execute useradd MySQL First (create a MySQL user who
For a MySQL database with a large number of accesses, the increment of the binary log is usually very fast, which is likely to surprise you. Like a racetrack, most of your disks will be filled with logs.Problems always need to be solved, and there
1. Change the table method.It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from
# SQL statement Optimization>1) Limit the amount of data that is queried once2) Link query instead of subquery3) Try not to use SELECT * To list the fields you need to find4) If the amount of data is particularly large, try to split a complex SQL
MySQL database is currently the largest open source application of relational database, there are a huge number of applications to store data in the MySQL database. The security and reliability of storing data is the focus of the production database.
1. Export all databasesUse Mysqldump's-all-databases parameter to export all the databases under your database root to a SQL file in one breath. Then, after reloading the system, use the source command to rewind back in a breath.You need to
db.url=jdbc:mysql://192.168.0.149:3306/pack_platform_dev?useunicode=true&characterencoding=utf-8& Zerodatetimebehavior=converttonull&transformedbitisboolean=true&usessl=falseURL input in db Config file? The following stringMySQL Insert data will
Tag: Equals condition database design shows Ash SQ nbsp execution InfoIndexBasic concepts of indexingYou can understand the index as a special kind of directory, its existence is convenient for us to quickly query data.I. Classification of the index
table Partitioning is the partitioning of a table's data according to a certain level of rulesintodifferent logical blocks, and physically stored separately, this rule is called partition function,can have different partition rules. through
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