Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2136923
  • 博文数量: 103
  • 博客积分: 206
  • 博客等级: 入伍新兵
  • 技术积分: 1819
  • 用 户 组: 普通用户
  • 注册时间: 2012-09-12 10:24
个人简介

效字当先,以质为本。

文章分类
文章存档

2019年(2)

2018年(4)

2017年(7)

2016年(3)

2015年(14)

2014年(33)

2013年(31)

2012年(9)

分类: Mysql/postgreSQL

2012-11-12 11:38:22

下载地址: http://dev.mysql.com/downloads/mysql/5.5.html#downloads

进入后会有选择系统


选择linux-generic后 又有很多产品选择,我们只下载以下2个就可以了

server:

Linux - Generic 2.6 (x86, 32-bit), RPM Package
MySQL Server
 5.5.20 48.9M

Download (MySQL-server-5.5.20-1.linux2.6.i386.rpm) MD5: 517e95a5d9ecc6d0f171bdfb9e62fb

client: 

Linux - Generic 2.6 (x86, 32-bit), RPM Package
Client Utilities
 5.5.20 16.2M

Download (MySQL-client-5.5.20-1.linux2.6.i386.rpm) MD5: 3aca3154617e6457e7a08eaf41c43a7a


下载完成后得到:


进入下载文件所以目录进行安装

如: 

> rpm -ivh MySQL-server-5.5.20-1.linux2.6.i385.rpm

> rpm -ivh MySQL-client-5.5.20-1.linux2.6.i385.rpmp

启动mysql

> service mysql start


登录MySQL的是mysql, mysql 的使用语法如下:
  mysql [-u username] [-h host] [-p[password]] [dbname]
  username 与 password 分别是 MySQL 的用户名与密码,mysql的初始管理帐号是root,没有密码,注意:这个root用户不是Linux的系统用户。MySQL默认用户是root,由于初始没有密码,第一次进时只需键入mysql即可。

然后输入mysql

root@test1 local]# mysql
  Welcome to the MySQL monitor. Commands end with ; or \g.
  Your MySQL connection is 1 to server version: 4.0.16-standard
  Type 'help;' or '\h' for help. Type '\c' to the buffer.
  mysql>
出现了“mysql>”提示符,恭喜你,安装成功!

修改登录密码

  MySQL默认没有密码,安装完毕增加密码的重要性是不言而喻的。

  1、命令
  usr/bin/mysqladmin -u root password 'new-password'
  格式:mysqladmin -u用户名 -p旧密码 password 新密码 


键入以下命令 :
  [root@test1 local]# /usr/bin/mysqladmin -u root password 123456
  注:因为开始时root没有密码,所以-p旧密码一项就可以省略了。

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