Basic MySQL commands in llinux (UBUNTU)

Source: Internet
Author: User
Tags mysql commands
Connect to MySQL on the local machine: mysql-u user name-P User Password connect to remote MYSQL: mysql-H host address-u user name-P user password after entering msyql: Add a new user: grant select on Database Name. * To username @ login host address identified by "password" to view the current database: Show databases; use a database: Use Database Name to view all tables in the database: show tables; view the table content: Select * from table name; Create Database: Create Database database name; Create Table: Create Table Name (column 1 type, column 2 type) view the data structure of a table: Describe table name insert data: insert into table name values (); Delete data: delete from table name where condition; modify data: update content from table name where condition clear table: delete from table name; Delete table: Drop table name; delete database: drop database database name; Exit: Exit
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.