数据人生

数据分析/数据挖掘 大数据交流加QQ群338726492或扫头像微信关注"一起DM"公众号...

linux下MySQL安装(rpm)

1,根据服务器情况下载server rpm和client rpm 下载地址http://dev.mysql.com/downloads/mysql/5.1.html

2,linux下执行rpm -ivh MySQL-server-community-5.1.58-1.rhel5.x86_64.rpm 

Preparing...                ########################################### [100%]
   1:MySQL-server-community ########################################### [100%]


PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:


/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h tc_132_16 password 'new-password'


Alternatively you can run:
/usr/bin/mysql_secure_installation


which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.


See the manual for more instructions.


Please report any problems with the /usr/bin/mysqlbug script!


Starting MySQL.[  OK  ]
Giving mysqld 2 seconds to start


netstat -nat

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN 

mysql服务已经启动

有冲突报请使用rpm -e --nodeps mysql-libs-5.1.52-1.el6_0.1.x86_64先卸载在安装。

3 ,安装客户端,执行 rpm -ivh MySQL-client-community-5.1.58-1.rhel5.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:MySQL-client-community ########################################### [100%]

执行mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.58-community MySQL Community Server (GPL)


Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> 

安装成功

4, 默认mysql安装完成后是没有密码的,

执行usr/bin/mysqladmin -u root password 'newpassword' 

修改密码

连接mysql -uroot -pnewpassword

成功

安装mysql完成

重启mysql可以通过service mysqld restart完成

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/liuzhoulong/article/details/6877276
个人分类: 数据库/sql
想对作者说点什么? 我来说一句

linux下mysql的rpm安装包

2016年11月02日 24.56MB 下载

linux下非root权限的mysql安装

2010年12月16日 27KB 下载

Linux下MYSQL安装与卸载

2015年03月30日 63KB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭