1. Open MySQL workbench and select "create eer model from existing database" in the middle of the homepage "data modeling ";2. Select "manage stored connections..." in "stored connection ...";3. Select "new" in manage dB connections to create a
Root @ DB-02 ~] # Mysql-u Root-Bash: mysql: Command not found
Cause: by default, the system will find the command under/usr/bin. If this command is not in this directory, of course, the command cannot be found, what we need to do is map a link to
1. index creation time: it is worthwhile to create an index for a field in select, filter, and sort conditions.
2. For Fuzzy queries like '% XXX', normal indexes cannot be satisfied, and full-text indexes must be created.
3. if there are
To replace part of a field, use the update statement:
UPDATE table name SET field name = REPLACE (REPLACE the previous field value, 'replace the previous keyword ', 'replace the previous keyword') WHERE field name REGEXP "REPLACE the previous
In Windows, the following ERROR occurs during mysql Logon: ERROR 1045: Access denied for user: 'root @ localhost' (Using password: YES)
I found some solutions from the Internet and finally got a solution. Now I want to record the specific
The development environment of a company is usually deployed on the Intranet, and then there will be public servers for developers and tests. Therefore, there is often a need to connect to the server through ssh or a local mysql client, in my
How can I use a command line to access mysql? I have not seen a friend raise such a question on the Forum recently. Some netizens have also given the answer, and I would like to share it with you here!
A free version of software for converting
MySQLTuner: http://github.com/rackerhacker/MySQLTuner-perl
MySQLTuner usage:Downloading and using MySQLTuner is actually a very simple process:
Wget mysqltuner. plPerl mysqltuner. pl
If you 'd rather not invoke perl every time, just make it
Relational databases depend on primary keys, which are the foundation of the Physical Mode of databases. The primary key has only two purposes on the physical layer:
Uniquely identifies a row.As an object that can be effectively referenced by a
1. Install Nginx
One command:USE = fastcgi emerge nginx
Create a user and a group:Groupadd wwwUseradd www-g www
After Nginx is installed, the nginx group and nginx users are added by default. However, I still prefer to create a www group and www
We know that mysqli is a new MySQL interface provided in PHP 5, which uses the object-oriented idea. The code using the mysqli interface is more readable, and its execution efficiency is higher than that of the mysql interface. In addition, mysqli
Note: in mysql, ROW_COUNT () can return the number of rows affected by the previous SQL UPDATE, DELETE, and INSERT operations.
MySQL test (database version: 5.1.22 ):
1. Create a database table:
Copy codeThe Code is as follows: create table t (
1. Introduction
In the Web application architecture, the data persistence layer (usually a relational database) is a key core component and has a very important impact on the system performance. MySQL is currently the most widely used open-source
1. query help? Contents2. Use the merged hash value to separate BLOB or TEXT3. Number of points used for currency (decimal or numberic)4. SQL _mode?5. order by rand () limit 1000;6. Optimize show status like 'com' Com_select Com_insert and so on to
1. Create the path to save the mysql backup file/mysqldata
# Mkdir/mysqldata
2. Create the/usr/sbin/bakmysql file.# Nano/usr/sbin/bakmysql
Input:Copy codeThe Code is as follows :#! /Bin/shName = 'date + % Y % m % d'Mysqldump --
I. concept:① Database Synchronization (master-slave synchronization-write data to the slave server while writing data to the master database)② Database Synchronization (master-master synchronization-two database servers write data to each other)
Ii.
I. concept:
① Database Synchronization (master-slave synchronization-write data to the slave server while writing data to the master database)② Database Synchronization (master-master synchronization-two database servers write data to each other)
Ii.
Environment
MySQL 5.1 + command line tool
Problem
MySQL table field settings Default Value
Solution
Copy codeThe Code is as follows: -- SQL:
Create table test (
I _a int NOT NULL DEFAULT 1,
Ts_ B timestamp NOT NULL DEFAULT NOW (),
C_c char (2)
If the database in use suddenly has some class problems
Run the following command in Linux. Of course, you need to find your mysql directory.
LinuxCopy codeThe Code is as follows:/usr/local/mysql/bin/mysqladmin-u root-p flush-tables
WindowsRun lush-
Edit the my. cnf or my. ini file and remove the comments of the following lines of code:
Copy codeThe Code is as follows: log_slow_queries =/var/log/mysql/mysql-slow.log.
Long_query_time = 2
Log-queries-not-using-indexes
This will record slow
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