Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install mysql through yum warehouse under CentOS6.5

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment: Centos6.5

View the centos version:

[root@localhost] # cat / etc/redhat-release CentOS release 6.5 (Final)

1. Check to see if mysql is installed

[root@localhost ~] # rpm-qa | grep 'mysql' [root@localhost ~] #

Shows that there is no installation.

two。 Install the mysql client

[root@localhost ~] # yum-y install mysql [root@localhost ~] #

3. Install the mysql server

[root@localhost ~] # yum-y install mysql-server mysql-devel [root@localhost ~] #

4. Install mysql client and server

[root@localhost ~] # yum-y install mysql mysql-server mysql-devel [root@localhost ~] #

5. Query whether mysql has been installed

Take installing mysql client and server as an example:

[root@localhost ~] # rpm-qa | grep 'mysql'mysql-libs-5.1.73-8.el6_8.x86_64mysql-devel-5.1.73-8.el6_8.x86_64mysql-5.1.73-8.el6_8.x86_64mysql-server-5.1.73-8.el6_8.x86_64 [root@localhost ~] #

6. Start mysql

[root@localhost ~] # service mysqld startStarting mysqld: [OK] [root@localhost ~] #

Or use the following command:

[root@localhost ~] # / etc/init.d/mysqld startStarting mysqld: [OK] [root@localhost ~] #

7. View mysql status

[root@localhost ~] # service mysqld statusmysqld (pid 3043) is running... [root@localhost ~] #

8. Enter mysql

Enter mysql--- Note: the root installed with mysql does not have a password by default.

Enter mysql as root user name:

[root@localhost] # mysql-uroot-pEnter password: Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 3Server version: 5.1.73 Source distributionCopyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >

9. Set the boot entry for mysql

[root@localhost ~] # chkconfig mysqld on [root@localhost ~] #

Well, the installation of mysql is complete at this point.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report