Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1459416
  • 博文数量: 181
  • 博客积分: 3308
  • 博客等级: 中校
  • 技术积分: 2227
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-03 12:03
个人简介

我是zoro

文章分类

全部博文(181)

文章存档

2015年(1)

2013年(35)

2012年(39)

2011年(50)

2010年(56)

分类: LINUX

2013-11-06 14:12:06


    之前项目中使用的数据库为sqlite,因为它是个本地数据库,不能远程,故研究一下mysql。
    记录一下安装过程吧。

主机:centos6.2, x84_64
准备安装的Mysql版本:5.1.72(手头上有一本参考书,先照着来吧)

1. 下载
http://dev.mysql.com/downloads/mysql/5.1.html#downloads

我下载了:
MySQL-client-5.1.72-1.glibc23.x86_64.rpm  
MySQL-server-5.1.72-1.glibc23.x86_64.rpm
MySQL-devel-5.1.72-1.glibc23.x86_64.rpm   
MySQL-shared-5.1.72-1.glibc23.x86_64.rpm

2. 安装
使用rpm -ivh 依次安装
所幸,没啥问题。
[root@localhost tmp]# rpm -ivh MySQL-server-5.1.72-1.glibc23.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [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 localhost.localdomain 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. SUCCESS! 

3. 测试
在命令行中输入: mysql
进入了mysql命令行状态
mysql>

4. 改个密码
mysqladmin -u root password 123456
然后登陆
mysql -u root -p


阅读(2368) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~