Linux MySql commands and Linux MySql commands

Source: Internet
Author: User
Tags mysql commands

Linux MySql commands and Linux MySql commands

1. Install the MySql server command:
Yum install mysql-server

Yum install mysql-devel

2. Install the MySql client

Yum install mysql

3. Start the service

Service mysqld start or/etc/init. d/mysqld start

Stop:
Service mysqld stop

Restart:
Service mysqld restart

4. Create a root administrator:
Mysqladmin-u root password 123456

5. Login

Mysql-uroot-p123456

6. Authorize remote connection access

Grant all privileges on *. * TO 'root' @ '%' identified by 'Password' with grant option;
7. display the database
Show databases;

8. Switch to a database

Use mysql (database name)

9. display tables in the database

Show tables;

10. display the data table structure:
Describe table name;

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.