码迷,mamicode.com
首页 > 数据库 > 详细

MySQL在linux上的rpm包方式安装方法

时间:2017-04-01 12:53:02      阅读:308      评论:0      收藏:0      [点我收藏+]

标签:shutdown   data   from   min   log   daemon   x86   dsa   ice   

1、下载上传mysql server和client rpm包:

[root@faspdev mnt]# ls

MySQL-client-5.5.53-1.el6.x86_64.rpm

MySQL-server-5.5.53-1.el6.x86_64.rpm

2、安装mysql数据库:

1)安装mysql server端rpm包:

[root@faspdev mnt]# rpm -ivh MySQL-server-5.5.53-1.el6.x86_64.rpm

warning: MySQL-server-5.5.53-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                ########################################### [100%]

   1:MySQL-server           ########################################### [100%]

2)安装mysql client端rpm包:

[root@faspdev mnt]# rpm -ivh MySQL-client-5.5.53-1.el6.x86_64.rpm

warning: MySQL-client-5.5.53-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                ########################################### [100%]

   1:MySQL-client           ########################################### [100%]

3、启动、关闭mysql数据库:

1)命令方式:

*启动数据库:

[root@faspdev bin]# pwd

/usr/bin

[root@faspdev bin]# ./mysqld_safe &

[1] 21688

[root@faspdev bin]# 161018 17:47:08 mysqld_safe Logging to ‘/var/lib/mysql/faspdev.err‘.

161018 17:47:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

*关闭数据库:

[root@faspdev bin]# pwd

/usr/bin

[root@faspdev bin]# ./mysqladmin -uroot shutdown

2)服务方式:

*启动数据库:

[root@faspdev ~]# service mysql status

MySQL is not running                                       [FAILED]

[root@faspdev ~]# service mysql start

Starting MySQL..                                           [  OK  ]

[root@faspdev ~]# service mysql status

MySQL running (21992)                                      [  OK  ]

*关闭数据库:

[root@faspdev ~]# service mysql stop

Shutting down MySQL.                                       [  OK  ]

[root@faspdev ~]# service mysql status

MySQL is not running                                       [FAILED]

4、访问数据库:

技术分享

MySQL在linux上的rpm包方式安装方法

标签:shutdown   data   from   min   log   daemon   x86   dsa   ice   

原文地址:http://www.cnblogs.com/wcwen1990/p/6655256.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!