Access MySQL guide with ODBC interface
Current Author: Wang Mei (HeartIcy@163.com)
Date Created: January 15, 2003
Revised version: 1.1
MySQL's good and bad I think about it. I always think that this is not what a programmer or system designer should
Copy an entire table
The code is as follows
Copy Code
CREATE TABLE new_table select * from Old_table;
Copy tables, do not copy data
The code is as follows
Copy Code
CREATE TABLE new_
This article uses Debian Sarge Linux systems for each of our nodes. Other Linux distributions may be installed a little bitDifference. The version of MySQL we use 5.0.19. If you don't want to use MySQL 5, you can also use MySQL 4.1 to doI haven't
The fuzzy search keyword in mysql can be used with the LIKE keyword, which can query for fields with key words, but when the data is large (such as millions), a full table scan can cause poor performance due to the inability to use the index. How
The following examples are to copy old_table to new_table.
To start with the conclusion, the most recommended practice is the following two lines:
The code is as follows
Copy Code
CREATE TABLE new_table like
The following is an instance of importing data from MySQL into hive.
–hive-import indicates that the import to hive,–create-hive-table represents the creation of hive tables. –hive-table Specifies the name of the Hive table.
[Zhouhh@hadoop46 ~]$
1. Grant statement
Format: Grant Select on database. * To User name @ login host identified by "password"
Description
(1) Grant all grants all permissions
(2) All tables in the Demo.* database demo
(3) NewUser user name
(4) @localhost MySQL
MySQL group BY, sorting the largest record of time in each record
Here is the test table, which tests the SQL
CREATE TABLE IF not EXISTS ' test ' (' ID ' int (a) unsigned not NULL auto_increment,' Install ' int (a) unsigned not NULL,' Day ' int (a)
The benefits of using MySQL master-slave replication are:
1, the use of the master-slave server architecture, stability can be improved. If the primary server fails, we can use the server to provide services;2, in the master and slave server
MySQL's most common index structure is btree (O (n)), but there are always situations where we want to use other types of indexes for better performance. Hash is one of the options, for example, when we retrieve the user ID by user name, they are
In other words, there is an article table article, the time to store the article is the Add_time field, which is type int (5), now needs to query the total number of articles added today and sorted by time from big to small, the query statement is
MySQL limit syntax
The code is as follows
Copy Code
SELECT * FROM table LIMIT [offset,] rows | Rows Offset Offset
The LIMIT clause can be used to force a SELECT statement to return the specified number of
When you first install MySQL on a machine, the authorization table in the MySQL database is initialized like this:
You can connect as root from the local host (localhost) without specifying a password. Root user has all permissions (including
MySQL Database connection class/******************************** PHP MySQL Connect* Author:ray* DATE:2005/07/30* UPDATA:2005/10/23* version:0.1*//* Determine if the parameters required to connect to the database exist.if (empty ($dbhost)){$error = "
First, use phpmyadmin to log on.#2003-no response from the server Error messageThe MySQL service fails to log on with the password. MYSQL_SF_9O6GOK because of the following error:Logon failed: the specified account password has
Many of my friends don't know how to get a website after they buy win vps, today, I will explain in detail how to use IIS + PHP + MYSQL + N point host panel in Win2003 VPS to build a Typecho website graphic tutorial:I. Preparations:1. Obtain the IP
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