安装包下载 MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar
http://happyqing.iteye.com/admin/blogs/1835896
需要安装
MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm
MySQL-client-community-5.1.73-1.rhel5.x86_64.rpm
安装了client,在服务器上才能用mysql命令连接到mysql服务器
本人采用mysql用户安装的,用sudo rpm
linux下mysql5.1卸载 rpm
http://happyqing.iteye.com/blog/2033441
添加mysql组
[root@dev soft]# groupadd mysql
添加mysql用户
[root@dev soft]# useradd -g mysql mysql
[root@dev /]# cd /soft
[root@dev soft]# mkdir mysql-5.1.73
把MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar上传至此目录
改变目录及以下文件的所有者
[root@dev soft]# chown -R mysql ./mysql-5.1.73/
切换用户
[root@dev soft]# su - mysql
[mysql@dev ~]$# cd /soft/mysql-5.1.73
对用户加执行权限
[mysql@dev mysql-5.1.73]$ chmod u+x MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar
解压文件
[mysql@dev mysql-5.1.73]$ tar -xvf MySQL-community-5.1.73-1.rhel5.x86_64.rpm-bundle.tar
MySQL-community-debuginfo-5.1.73-1.rhel5.x86_64.rpm
MySQL-embedded-community-5.1.73-1.rhel5.x86_64.rpm
MySQL-client-community-5.1.73-1.rhel5.x86_64.rpm
MySQL-shared-compat-5.1.73-1.rhel5.x86_64.rpm
MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm
MySQL-devel-community-5.1.73-1.rhel5.x86_64.rpm
MySQL-shared-community-5.1.73-1.rhel5.x86_64.rpm
MySQL-test-community-5.1.73-1.rhel5.x86_64.rpm
对用户加执行权限
[mysql@dev mysql-5.1.73]$ chmod u+x ./*
安装mysql服务器
非root用户用rpm命令安装会报如下错误
[mysql@dev soft]$ rpm - ivh MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm
error: can't create transaction lock on /var/lib/rpm/__db.000
非root用户使用rpm可以采用 sudo 命令 的方式,sudo 需要配置
[mysql@dev mysql-5.1.73]$ sudo rpm -ivh MySQL-server-community-5.1.73-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 dev 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..[确定]
Giving mysqld 2 seconds to start
查看服务是否启动
[mysql@dev mysql-5.1.73]$ netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
安装客户端
[mysql@dev mysql-5.1.73]$ sudo rpm -ivh MySQL-client-community-5.1.73-1.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client-community ########################################### [100%]
连接服务器端,此时root的密码是空,所以只用写mysql就可以
[mysql@dev mysql-5.1.73]$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.73-community MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit
Bye
设置root用户的密码
[mysql@dev mysql-5.1.73]$ mysqladmin -u root password "password"
修改密码后客户端登录
[mysql@dev mysql-5.1.73]$ mysql -u root -p
Enter password:
mysql修改root 可以远程访问,两种方式
1.通过授权命令
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
此操作会在user表插入一条新的记录。
2.直接改表
mysql> UPDATE user SET Host='%' WHERE User='root' AND Host='localhost' LIMIT 1;
刷新权限
mysql> flush privileges;
安装好后还要做一些配置,如设置编码
linux下mysql5.1的配置 rpm
http://happyqing.iteye.com/admin/blogs/2032836
其他操作
创建数据库
mysql> create database ucms;
创建用户,%表示可以从任何服务器连接
mysql> CREATE USER 'ucms'@'%' IDENTIFIED BY 'ucms';
授权,把ucms数据库是所以权限授权给ucms用户
mysql> GRANT ALL PRIVILEGES ON ucms.* TO 'ucms'@'%' IDENTIFIED BY 'ucms' WITH GRANT OPTION;
刷新权限,使之生效
mysql> FLUSH PRIVILEGES ;
linux安装mysql-5.1.60 tar.gz
http://happyqing.iteye.com/blog/1944835
相关推荐
mysql 5.1.73 驱动包。。。。。。。。。。。。。。。。。。
linux下安装mysql(rpm)详解.docx
linux下安装mysql服务器
安装文件:MySQL-server-5.1.62-1.glibc23.i386.rpm # rpm -ivh /software/mysql/MySQL-server-5.1.62-1.glibc23.i386.rpm 这是在/usr/share/mysql 目录下生成一些 文件,其中有一个文件名为:my-medium.cnf 将其...
Linux下安装Mysql数据库; Linux mysql rpm安装包 Linux mysql安装教程
Linux下安装MySQL所需rpm包 客户端 ,由于文件过大,客户端跟服务器端分开上传了
在Linux 系统下使用RPM 安装方式 ,其中使用到的资源文件,版本是mysql5.7 包含的资源文件: mysql-community-client-5.7.16-1.el7.x86_64.rpm mysql-community-common-5.7.16-1.el7.x86_64.rpm mysql-community-...
1、把以下5个rpm上传到/home/soft/mysql目录 2、执行rpm安装 #rpm -ivh mysql-*.rpm --force --nodeps 3、安装完成后执行以下命令查询mysql root帐号密码 #grep 'temporary password' /var/log/mysqld.log 没拿到,...
Linux下安装mysqlLinux下安装mysqlLinux下安装mysqlLinux下安装mysql
linux下如何彻底卸载RPM或yum安装的mysql
MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm MySQL-server-community-5.1.73-1.rhel5.x86_64.rpm
linux的mysql安装文件rpm版,安装过程可以看博客
linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下mySql安装 经典 实验无数次的经验linux下...
linux 系统下安装mysql数据库
描述了在Linux系统中该如何下载安装Mysql数据库,希望通过自己的慢慢学习可以掌握越来越多有关Linux的知识,从而进行整理和巩固,来提高自己的技术,而Linux操作系统是基于UNIX操作系统发展而来的一种克隆系统,它...
linux平台安装mysql所需的rpm包,包括client、server、devel等
国产麒麟系统KylinOS 安装MySQL 8.0-RPM包安装操作手册
帮助大家快速安装mysql,无盲点。 需要提前部署好服务器的操作系统centos 6.5,本文使用的是64位的操作系统 2,MySQL的安装包,需要提前下载好,mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz 3,MySQL的软件依赖包,...
Linux 使用rpm方式安装mysql,供大家参考学习使用!,附详细安装配置过程,以及问题处理等
rpm文件是Red Hat公司开发的软件安装包,rpm可让Linux在安装软件包时免除许多复杂的手续。该命令在安装时常用的参数是 –ivh ,其中i表示将安装指定的rmp软件包,V表示安装时的详细信息,h表示在安装期间出现“#”...