PhpMyAdmin can be enabled at the beginning, but I changed the root password in the permission, and then opened phpMyAdmin, and it will show: "phpMyAdmin tried to connect to the MySQL server, but the server refused to connect. Check the host, user
Record it by yourself to make a better impression. The English documents are from the official MySQL documents. The Chinese is translated by yourself according to your understanding.
Select... lock in share mode sets a Shared Mode Lock on the
To install MySQL, run the following command at a terminal prompt:
Sudo apt-Get install mysql-Server
Sudo apt-Get install mysql-Client
Sudo apt-Get install php5-mysql // The installation php5-mysql is to connect PHP to MySQL
Once the installation
MySQL has a function to log down and run slow SQL statements. This log is not available by default. To enable this function, modify my. CNF or add some parameters when MySQL is started.
If you modify it in my. CNF, add the following lines:
I thought MySQL could perform such a query.
Select ID, list, name from table where 'dao' in (list); (1)
Note: 1. Table contains three fields: int, list: varchar (255), name: varchar (255)
In fact, this is not the case. In this way, the query is
For example, to create a user, blog, category, and comment table
User table: stores the user name and password
User:
ID
Username
Password
Blog: stores the title, content, and creation time of a blog.
Blog:
ID
Title article
Installation environment:
OS: Windows XP
RUBY: ruby1.9.1
MySQL: mysql5.1.46 (username/password: Root/root port: 3306)
Ruby-MySQL DRIVER: mysql-2.8.1-x86-mswin32.gem
(Note: drivers of version 2.7.3 will appear during testing.Require "MySQL", the
Sun has released the latest version of MySQL for the first time since the acquisition of MySQL in May. The latest version of MySQL 5.1 will be released this quarter, but sun does not disclose the specific day. But they released an RC version that is
Today I encountered a file with a primary key conflict. I think the primary keys of the two records are obviously different. One is JAA in upper case and the other is JAA in lower case, mo Gray is that MySQL is not case sensitive to field values. I
I. Basic Introduction1. to_days (date)Returns the number of days (the number of days from 0 years ):Mysql> select to_days (20110311 );+ ------------------- +| To_days (20110311) |+ ------------------- +| 1, 734572 |+ ------------------- +1 row in
Select * from Table limit 5, 10; # return data in rows 6-15
Select * from Table limit 5; # Return the first five rows
Select * from Table limit; # Return the first five rows
Performance Optimization:Based on the high performance of limit in mysql5.0,
Document directory
Install MySQL command line client and MySQL server through yum
Modify/etc/My. conf and set the default Character Set of MySQL and mysqld to utf8.
Start mysqld for the first time after installation
Root User connected to
Starting from the database structure
When defining field types, follow the following rules:
Minimum Field Length
Priority fixed length type
Define "not null" as much as possible"
Avoid using "zerofill" in Numeric
1. select the most suitable field attributeMySQL can support access to large data volumes, but generally, the smaller the table in the database, the faster the query will be executed on it. Therefore, when creating a table, we can set the field
Prepare the software first:
Apache Official Website:Apache_2.0.55-win32-x86-no_ssl.msi,More versions are available here;
PHP Official Website:Php-5.0.5-Win32.zip,More images,Download more versions;
Official MYSQL:Mysql-4.1.14-win32.zip,More
// Primary key
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
// Add a new column
alter table t2 add d timestamp; alter table infos add ex tinyint not null default '
When the database table size is large and the load is high, it is inevitable that the time consumed by an SQL statement is prolonged. Half a month ago, a scheduled task ran for eight hours in the early morning and suddenly fell helpless. Finally,
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