MySQL Utilities IntroductionMySQL Utilities provides a set of command-line tools for maintaining and managing MySQL servers, including:Administrative Tools (clone, copy, compare, diff, Export, import)Replication tools (Installation,
Prepare an article
First, the environment description:
Operating system: Windows Server R2
PHP Version: PHP 5.5.8
MySQL version: MySQL5.6.15
Second, related software downloads:
1, PHP download address:
First of all, it is an honor to find this article ...
If you have forgotten the MySQL password, try this method below.
1, open My.ini
The code is as follows
Copy Code
[Mysqld]port=3306#skip-grant-tables
Add
When the probe is used for phpinfo testing after installation. The default localhost is found to be unable to connect to the MARIADB database, but can be connected through 127.0.0.1. Said it was very depressing. The first thought was: is the Hosts
MySQL, the same table multiple timesatmp fields set default, often an error.
A table can have only one field that sets default.
But sometimes only one field setting default also complains.
Will report: incorrect table definition; There can be
Installation of MySQL:
1. Add User Group#> Groupadd MySQL2, add Users#> useradd-r-G MySQL MySQL3, switch to the installation directory (take/usr/local as an example)#> cd/usr/local4, Decompression (Mysql-5.5.22-linux2.6-i686.tar.gz has been copied
Mysql Statement Change table structure ALTER (ALTER)Original
Table A For example:
The code is as follows
Copy Code
CREATE TABLE A (A_a int NOT NULL,A_b int NOT NULL,A_c Char) Engine=innodb Charset=utf8;
Syntax:
The free universal space provided by the wide-mutual technology is provided only for learners and is opened immediately.
2, users can apply for 300M space, activated immediately after the use.
[Free universal space Application
Find out what binary log files are currently
The code is as follows
Copy Code
Mysql> show binary logs;+------------------+-----------+| Log_name | File_size |+------------------+-----------+| mysql-bin.000001 | 1357315
Its grammatical structure is:
The code is as follows
Copy Code
TRUNCATE [TABLE] Tbl_name
Here's a simple example,
I want to delete all the records in the Friends table, you can use the following statement:
Next I will use the users (Userid,username,password ...). Table (with Ibedovan Records) as an example, to explain the next several methods of efficiency problems:
The code is as follows
Copy Code
1.select * from the
Optimization objectivesReduce IO timesIo is always the easiest place to bottleneck the database, which is determined by the responsibility of the database, most of the database operations over 90% of the time is occupied by IO operations, reducing
This represents the width of the displayThe display width of the whole series and how many characters does MySQL need to display the column value, it has nothing to do with the size of the storage space required by the integer, for example,
This link is not guaranteed to be permanent and if it fails please go to rpm search to download the corresponding package.
1. Run the following command
#wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm#wget http://
First MySQL updates a field of data, which is generally written like this:
UPDATE mytable SET myfield = ' value ' WHERE Other_field = ' other_value ';
You can also use in to specify the records to update:
UPDATE mytable SET
Rsyslog Introduction:
The Rsyslog service is specifically responsible for recording system log information on CentOS (earlier versions of the system use Syslog,rsyslog as the next generation of syslog), and Rsyslog consists of three parts:
Socket file: The file you need when you connect using a UNIX domain socket.PID file: The process ID file for the MySQL instance.MySQL table structure file: Used to store MySQL table structure definition file.Socket fileLocal connection to UNIX
The applicable scenario of the MySQL master-slave architecture is read/write splitting, which reads data from the master database. In most scenarios, there are many read cases, the single master multi-slave architecture can solve the problem of high
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