CentOS6.5 Installing the MySQL5.1.73 database

Source: Internet
Author: User

First, describe

This blog mainly introduces CentOS6.5 installation MySQL database , startup and shutdown MySQL service, MySQL login and exit, as well asthe password configuration and modification of my SQL database root user.

Ii. Main steps

1. Check if the system has MySQL database installed

First check if the operating system has an operating system installed, display only one MySQL class library, and do not install the database.

[Email protected] tongsoftware]$ Rpm-qa | grep MySQL
Mysql-libs-5.1.73-3.el6_5.x86_64

2. Installing the MySQL database with Yum requires the installation of MySQL client and mysql-server terminal

[[email protected] tongsoftware]$ sudo yum install MySQL Mysql-server
3. View the installed database and display the completed database

[Email protected] tongsoftware]$ Rpm-qa | grep MySQL
Mysql-server-5.1.73-3.el6_5.x86_64
Mysql-5.1.73-3.el6_5.x86_64
Mysql-libs-5.1.73-3.el6_5.x86_64

4. Check the startup status of the database and start the MySQL database if it is not started

[[email protected] tongsoftware]$ sudo service mysqld status
[sudo] password for tong:
Mysqld is stopped
[[email protected] tongsoftware]$ sudo service mysqld start
Problems with The/usr/bin/mysqlbug script!
[OK]
Starting mysqld: [OK]

5. Default no password to log in to the database as the root user

[Email protected] tongsoftware]$ mysql-u root
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.1.73 Source Distribution
Copyright (c) and/or, Oracle, its affiliates. All rights reserved
...

Mysql>

6. Enter exit to exit the database

Mysql> exit
Bye

7. Configure the initial root password

[email protected] tongsoftware]$ sudo mysqladmin-u root password Admin123

format; mysqladmin-u User password Password

8. The root user logs into the database with a password

[email protected] tongsoftware]$ sudo mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 6
Server version:5.1.73 Source Distribution

9. Modify User Password

[email protected] tongsoftware]$ sudo mysqladmin-u root-p password Admin

Enter Password:

Format: mysqladmin-u user-p password password

CentOS6.5 Installing the MySQL5.1.73 database

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.