zoukankan      html  css  js  c++  java
  • mysql5.5 for linux 安装(转)

    下载地址: 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: 517e95a5d9ecc6d0f171dfbdfb9e62fb

    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 id is 1 to server version: 4.0.16-standard
      Type 'help;' or 'h' for help. Type 'c' to clear 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旧密码一项就可以省略了

    https://www.2cto.com/database/201201/117241.html

  • 相关阅读:
    c++单例设计模式---17
    c++友元函數---16
    c++const关键字---15
    c++浅拷贝和深拷贝---14
    linux shell 基本语法
    Linux静态库生成
    alsa wav
    Android Butterknife使用方法总结 IOC框架
    利用cglib给javabean动态添加属性,不用在建VO
    钢铁雄心三 通过事件做修改器
  • 原文地址:https://www.cnblogs.com/xihong2014/p/9655278.html
Copyright © 2011-2022 走看看