MYSQL Big Data Import
MYSQL Big Data Import
Thanks for the Code provided by XP!Record it here, because it will be used later. It will be used for data query!Step 1: mysql-h localhost-urootStep 2: show databases;Step 3: use changchunmap;Step 4:
Connection: Mysql-h host address-u user name-P user Password (note: U and root can be without spaces, others are the same)Disconnect: Exit (Enter)
Create authorization: Grant SELECT on database. * To User name @ login host identified by \ "Password
Friends familiar with Oracle know that when the Oracle database does not start properly, you can save data and reduce loss by dul or other tripartite tools that directly read data from data files. If you use the InnoDB engine in MySQL, you can also
The LOAD DATA infile statement reads from a text file into a table at a high speed. If you specify a local keyword, read the file from the client host. If local is not specified, the file must be located on the server. (Local is available in MySQL3.2
Hive provides a variety of composite data types:
Array, Struct, Map
struct use:
Hive> CREATE TABLE Student_test (ID INT, info struct)
> ROW FORMAT delimited FIELDS T erminated by ', '
> COLLECTION ITEMS terminated by
How to use compliant data structures in hive maps,array,structs
1. Use of array
Create a database table with array as the data type
CREATE table person (name String,work_locations array)
ROW FORMAT Delimited
Fields TERMINATED by ' \ t
Hive is installed on only one node
1. Upload the TAR package
2. Unzip
TAR-ZXVF hive-0.9.0.tar.gz-c/usr/local
3. Configure MySQL metastore (switch to root user)
Configuring Hive_home Environment variables
Rpm-qa | grep MySQL
RPM-E mysql-libs-5.1.66
Mysqlbinlog Usage NotesThe binary log file generated by the server is written in binary format. To check these text-formatted files, you should use the Mysqlbinlog utility.This should be called Mysqlbinlog:Shell> mysqlbinlog [options] log-files ...
Connection: Mysql-h host address-u user name-P user Password (note: U and root can be used without spaces, others are the same)Disconnect: Exit (Enter)Create authorization: Grant SELECT on database. * To User name @ login host identified by \
Connection: Mysql-h host address-u user name-P user Password (note: U and root can be used without spaces, others are the same)Disconnect: Exit (Enter)Create authorization: Grant SELECT on database. * To User name @ login host identified by \
Connection: Mysql-h host address-u user name-P user Password (note: U and root can be used without spaces, others are the same)Disconnect: Exit (Enter)Create authorization: Grant SELECT on database. * To User name @ login host identified by \
MySQL Common commands1: Use the show statement to find out what database currently exists on the server:Mysql> SHOW DATABASES;2:2. Create a database Mysqldatamysql> CREATE DATABASE Mysqldata;3: Select the database you createdmysql> use Mysqldata;
MySQL exports import data in the following ways: 1) Select ... into outfile2) Load Data3) mysqldump4) Mysqlimport5) MySQL One, table level import, exportAbout character handling has the following related clauses:1) field terminated by ': Use
Import Database:1 Mysql>use ygeshop;Ygeshop for Database name2 Mysql>source the imported file name;As I entered the command line: Mysql>source ygeshop.sql;1. Display the list of databases.show databases;The default is two databases: MySQL and test.
————————————————————————————————————————Add Permissions:The only Priv_type values can specify for a table is SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, GRANT OPTION, INDE X, and ALTER."FILE" is only assigned as a GLOBAL permission"The execution,
Thanks for the code provided by XP!Record here, because later learn to use, function data inquiry use!The first step: Mysql-h localhost-urootStep two: show databases;Step three: Use Changchunmap;Fourth step: Show tables;Fifth step: Load Data local
There are two simple methods in MySQL to load data into a MySQL database from a previously backed up file.
LOAD Data import:MySQL provides the load data statement as a bulk load. The following is an example declaration that reads a file dump.txt,
Hive Quick Start
@ (HIVE) [HIVE] (a) Simple introduction
1. Create a table
CREATE table if not exists ljh_emp (
name string,
salary float,
gender string)
comment ' Basic information of a employee '
row format delimited fields terminated by ', ';
2
hive Array, map, struct use
Hive provides a composite data type:Structs:structs internal data can be accessed via dot (.), for example, a column C in a table is of type struct{a int; b int}, we can access domain A by C.AMaps (k-v pair): Access to
Article Source: http://blog.csdn.net/piaolankeke/article/details/6272214MySQL writes data typically with INSERT statements, such as[C-sharp]View Plaincopy
INSERT into person values (Zhang San, 20), (John Doe, 21), (Harry, 70) ...;
But
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.