由于日志文件是掌握数据库运行状态的重要参考,因此日志文件的维护也有十分重要的意义。 mysql的日志类型有二进制日志,错误日志,通用日志,慢查询日志。
Add log analysis to the moduleLog-bin=mysql_bin//binary logLog-error=/usr/local/mysql/data/mysql_error.log//error logGeneral_log=on//Turn on universal
If judgmentdelimiter //CREATE PROCEDURE proc_if ()BEGIN declare i int default 0; if i = 1 THEN SELECT 1; ELSEIF i = 2 THEN SELECT 2; ELSE SELECT 7; END IF;END
Long time no blog, this period in the study of an open source project, inside the use of MySQL, long no use of MySQL. In the use of the process encountered a problem, remote login. Error message It is obvious that the connection failed. The solution
创建用户及密码mysql> create user ‘zhao‘@‘loacl‘ identified by ‘123123‘;mysql> use mysql;创建密文密码mysql> select password(‘123123‘); #查看明文对应的密文mysql> create user ‘test01‘@‘localhost‘ identified by #创建密文密码 ‘E56A114692FE0DE073F9A1DD68A00EEB9703F3F1‘;删除用户mysql>
MySQL full backup + incremental backup
Profile:
Manage MySQL configuration file, open Binlog log
for MySQL database:
Log_bi n =/var/log/mysql/mysql_bin.log
server-id = 1 (must
1, Linux under the installation of MySQL is the default: distinguish the case of the table name, do not distinguish between the case of the column name;2, with the root account login, in the/ETC/MY.CNF [mysqld] After adding add
Definition of master-slave introduction
MySQL master is also called replication, AB replication. Simply speaking is a and b two machines from the back, write the data on a, another B will follow the writing data, real-time data
Environment Description: Virtual machine prepared two, one as Nginx server +mysql server, IP: 192.168.55.129; Another as 2 tomcat servers, IP: 192.168.55.130. The client sends the request, first by nginx processing, if the static content directly
1. display the Database List.Show databases;At the beginning, there were only two databases: MySQL and test. The MySQL database contains MySQL system information. We can change the password and add new users to use this database for better work.2.
After a large amount of data is deleted from your database, you may find that the size of the data file is not reduced. This is because fragments are left in the data file after the delete operation. Discuz! The data table optimization function is
(1) Writing
You can use Notepad, ultraeidt, phped, and so on ...... Simple text editing software is available.
(2) Running
You need web server IIS or Apache, and then install a PHP on the line, http://www.php.net/to download.
Installation:
I. node information:Master1: 192.168.80.143/24 + CaMaster2: 192.168.80.144/24
The two nodes are the same as the master node and the slave of the other node.
Ii. Basic Configuration:
(1) MySQL is installed on both servers.
# pvcreate /dev/sda5
-- MySQL stored procedure/* Set @ result = 0; Create procedure login (-- defines parameters, including in, out, And inout types in user varchar (10 ), in pass varchar (10), out result INT) Begin declare passd varchar (10); -- declare declares
There is a need for a recent project to use views and stored procedures in ror Development
Because we want to use the view, and the rails migration file has the create_table method, we have to find whether to create a view in the migration file
5 minute DBA-database server hardware selection describes some ways to help the database select hardware, which is actually biased towards MySQL...
Simply put, it is of little significance to have a CPU larger than 8. You do not need to buy 4*4
I installed MySql in windows and want to access it through Linux on Vmware.
"MySQL error Nr 1130" prompt"
After searching, it turns out that the root user's access range is "localhost", that is, only the local machine can access it.
Show tables or show tables from database_name;Explanation: displays the names of all tables in the current database.
Show databases;Explanation: displays the names of all databases in MySQL.
Show processlist;Explanation: displays all processes
In large Web applications, databases often become a bottleneck for concurrent access. to effectively solve the bottleneck of concurrent access, the master-slave mode of multiple databases is used to increase the concurrent access to the web.The
MySQL Import and Export Database
Blog type:
Database
MySQL data structure The basic import/export commands for SQL linux windows databases are mysqldump and Source
In Linux, you can directly use the command line operation. In Windows, there
The larger the data size, the greater the difference between indexes. In fact, small personal professional applications can achieve the desired speed without indexing. When there are about 1000 data records, the additional overhead of tree search is
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