MySQL Related commands

Source: Internet
Author: User

1. Check if the MySQL server is started

-| grep mysqld
How to display the following, proof has been started

localhost:~ mhx$ Ps-ef | grep mysqld

0 1053 1 0 9:59 am ttys000 0:00.03/bin/sh/usr/local/mysql/bin/mysqld_safe--datadir=/usr/local/mysql/data--pi D-file=/usr/local/mysql/data/localhost.pid

74 1171 1053 0 9:59 am ttys000 0:00.48/usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql--datadir=/usr/local/ Mysql/data--plugin-dir=/usr/local/mysql/lib/plugin--user=mysql--log-error=/usr/local/mysql/data/localhost.err- -pid-file=/usr/local/mysql/data/localhost.pid

501 1242 1235 0 10:07 am ttys001 0:00.00 grep mysqld

2. Start the MySQL server

localhost:~ mhx$ cd/usr/local/mysql/support-files/

Localhost:support-files mhx$ sudo./mysql.server start

3. Login Data

Localhost:support-files mhx$ cd/usr/local/mysql/bin/

Localhost:bin mhx$./mysql-u root-p

3. View the database

mysql> show databases;

MySQL Related commands

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.