First, create a file directory.
Mkdir myfile
VI: Create and modify a fileVI delradiusdata
CopyCodeThe Code is as follows: VI is a common tool used to create and edit files in Linux. The startweblogic. Sh script has been created below as an
The MySQL command under fedora is described in detail first. I am also just learning mysql. If something is wrong, please correct me and hope that I can help you with some experience. The following describes my installation:
1. My operating
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
One common problem is that the offset of limit is too high, such as: limit 100000,20. In this way, the system will query 100020 entries and then discard all the preceding 100000 entries. This is a very costly operation, the query is slow. Suppose
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
Perform a detailed analysis on mysql Query Cache from five perspectives: Query Cache working principle, how to configure, how to maintain, how to determine the Query Cache performance, and suitable business scenario analysis.
Working Principle
The
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.
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-
Find the installation location of your mysql database, as shown below:C: \ Program Files \ MySQL Server 5.1, which contains the my. ini file. Find the following lines:[Mysqld]
Copy codeThe Code is as follows: # the TCP/IP Port The MySQL Server will
Query data for the current week
SELECT name, submittime FROM enterprise where yearweek (date_format (submittime, '% Y-% m-% D') = YEARWEEK (now ());
Query last week's dataSELECT name, submittime FROM enterprise where yearweek (date_format
There are three solutions to this problem:
1. Increase the value of the wait_timeout attribute of MySQL.
Modify the/etc/mysql/my. cnf file and set it in [mysqld:
# Set a connection to wait 8 hours in idle status.Wait_timeout = 86400Related
MYSQL date comparison
TO_DAYS (NOW ()-TO_DAYS (date_col) Our date_col must be in the date and time format, not the timestamp,
Mysql> SELECT FROM_UNIXTIME (875996580 );-> '2017-10-04 22:23:00'
Day (FROM_UNIXTIME (1277709862) returns the number
Install openstack folsom today. After installing mysql and adding corresponding databases and users to various services, you will find that
You cannot use the new user to log on to mysql. The method for adding users is as follows:
Mysql-uroot-p $
Change the Data Type of a column
[SQL]
Alter table visitor MODIFY nam VARCHAR (30 );
Append a new column
[SQL]
Alter table visitor ADD age INT;
Alter table visitor ADD age int first;
Alter table visitor ADD age int after nam;
Change column
Directory
Mysqladmin command
UPDATE user statement
Set password statement
Root Password loss (to be verified)
Mysqladmin command
(Back to directory)
The format is as follows (USER is the USER name and PASSWORD is the new PASSWORD ):
Mysqladmin-u
I checked it online. There are two methods: the first is the most earthy method: Use the like statement, and the second is the full-text index. I will search it online: how to get better full-text search results in MySQL
Many Internet applications
The index field is too long,
1. Modify the Field Length
2. Modify the default storage engine of mysql.
Add default-storage-engine = INNODB under [mysqld] of/etc/mysql/my. cnf
However, the INNODB engine must be used for database creation.
SQL
Create two user tables, user and user2. The table structure is the same, but the user table uses the InnoDB Storage engine, while the user2 table uses the MyISAM storage engine.
Copy codeThe Code is as follows: -- Table "user" DDL
Create table 'user
Here is my experience
This is generally the case when you first start to learn SQL.Copy codeThe Code is as follows: SELECT * FROM table order by id LIMIT 1000, 10;
However, when the data reaches the million level, writing will slow down.Copy
First, we will introduce how to use your own database to query multiple mobile phone numbers. We recommend that you have your own mobile phone number database. Under normal circumstances, you do not need to purchase the mobile phone number database
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