I. Usage
1. Use the show statement to find out the current database on the server:
mysql> SHOW DATABASES; +----------+ | Database | +----------+ | mysql | | test | +----------+ 3 rows in set (0.00 sec)
MySQL query optimization: profile function
MySQL query optimization: profile function. Note that you need to install the profile module.
1. The version is later than 5.0.37. (Show profiles and show profile were added in MySQL 5.0.37 .)
SELECT @
SQL command Check of MySQL open-source database
1. Install wamp5.xxOpen the installation file in the compressed package and install it on the Windows2000 Server or Windows XPThe installation directory is tentatively set to D:/Wamp/**
Modify the data content in the MySQL database to delete:
[Root@hk ~]#/usr/local/mysql/bin/mysql-uroot-p ' admin ' #进入mysqlMysql> CREATE DATABASE GBK default Character set GBK collate gbk_chinese_ci; #建立一个名字叫做gbk的数据库Mysql> Use GBKmysql> show
mysql> Use testDatabase changedMysql> set profiling=1;Query OK, 0 rows Affected (0.00 sec)Mysql> Show tables;+----------------+| Tables_in_test |+----------------+| Bag_item || Bag_user || Score || T |+----------------+Rows in Set (0.03 sec)Mysql>
MySQL Format statement specificationHow do I log into your database?Example!If you are compiling the installation of the flowers, then you have to compile the installation of the directory to go, my is installed into the/usr/local/mysql database: Cd/
Environment only needs to be installed on one node 2. Set environment variable vi. bash_profileexportJAVA_HOMEusrlibjvmjava-1.6.0-openjdk-1.6
Install and configure hive 1. download wget http://mirror.mel.bkb.net.au/pub/apache//hive/stable/hive-0.8.1.
MySQL5.5.21 tutorial 2, mysql5.5.21 tutorial
Now let's take a look at the basic table operations! It is mainly to create tables and basic constraints. We will continue to explain the index issue later!
# Columns-also known as attribute columns.
Mysql database operation statement and mysql statement
Mysql format statement SpecificationHow to log on to your database?Example!If it is the cost of compilation and installation, you have to go to the directory after compilation and installation.
Mysql learning notes: basic operations on tables and mysql learning notes
Create a table
Create table Name
Create table if not exists table name
mysql> create database company;Query OK, 1 row affected (0.00 sec)mysql> use company;Database
Php searches for all the table names in the mysql database. To display the names of all tables in a specified database in mysql, we can use the SHOWTABLES command. let's take a look at how SHOWTABLES obtains the names of all tables in the mysql
Alter is a very powerful feature. We can use ALTER to modify the data table name and some other operations, and let's look at an example of adding, deleting, and modifying the table name in the ALTER datasheet in MySQL.
Modify the data content
2.1 Login to MySQL console [username is root, password defaults to NULL]
Switch to MySQL's Bin directory cd D:/wamp/mysql/bin
Login to MySQL Console
Syntax: mysql-h hostname-u username-p
Connecting to another host
Code: Mysql-h 192.168.1.1-u
Now learn about the basic operation of the table! Mainly to establish the table and basic constraints, will continue to explain the index of the problem!#列-also known as an attribute column, you must specify the name and data type # Index of the
recently started to learn MySQL, mainly through books, and see Yan 18 teacher's video, and then through the blog to record their learning process. log in to databaseView all current databasesMysql> show databases, #查看当前全部数据库 +--------------------+|
Query Profiler is a query diagnostic analysis tool that comes with MySQL to analyze where the performance bottlenecks of an SQL statement are. Usually we are using the explain, and slow query log is not accurate analysis, but query Profiler can
We have a database with Mysqldump backup later backups are getting slower, and backup files are getting bigger. When checking to see that there are two tables very large and no need to back up, so decided to back up this library when the two of them
first, start and close1.1 Linux command to start MySQL:
A. RPM Package Installation: Service mysqld start
B. Source package Installation:/usr/local/mysql/bin/mysqld_safe--user=mysql &
1.2 Linux to restart MySQL command:
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.