CentOS 6.3 64位下mysql5.5.25安装图解教程
Linux环境说明 linux操作系统:CentOS 1. 下载CentOS系统对应的MySQL版本 下载地址:http://dev.mysql.com/downloads/mysql/ Select platform:Linux-generic; 版本:根据你计算机的位数选择相应的版本。(32位,或者64位系统) 2. 下载后有以下几个rpm文件:
Linux环境说明
linux操作系统:CentOS
1. 下载CentOS系统对应的MySQL版本
下载地址:http://dev.mysql.com/downloads/mysql/
Select platform:Linux-generic;
版本:根据你计算机的位数选择相应的版本。(32位,或者64位系统)
2. 下载后有以下几个rpm文件:
3、如果你只是需要安装mysql,那么只需要安装如下文件
MySQL-server-5.6.22-1.linux_glibc2.5.x86_64.rpm
MySQL-client-5.6.22-1.linux_glibc2.5.x86_64.rpm
MySQL-devel-5.6.22-1.linux_glibc2.5.x86_64.rpm
MySQL-server-5.5.25a-1.rhel5.x86_64.rpm、MySQL-client-5.5.25a-1.rhel5.x86_64.rpm和MySQL-devel-5.5.25a-1.rhel5.x86_64.rpm三个文件换成MySQL-server-5.6.22-1.linux_glibc2.5.x86_64.rpm、MySQL-client-5.6.22-1.linux_glibc2.5.x86_64.rpm和MySQL-devel-5.6.22-1.linux_glibc2.5.x86_64.rpm三个rpm文件即可)
查看当前安装的linux版本
命令:lsb_release -a 如下图所示
通过上图中的数据可以看出安装的版本为CentOS release 6.3,所以我们需要下载CentOS release 6.3对应的mysql安装包
下载mysql安装文件
1、如果你只是需要安装mysql,那么只需要安装如下文件
MySQL-server-5.5.25-1.rhel5
MySQL-devel-5.5.25-1.rhel5
MySQL-client-5.5.25-1.rhel5
2、如果你需要搭建Linux整个实施环境(nginx、php、mysql、tomcat、jdk、服务器多域名配置)
请参考我的Linux项目实施系列教程:
CenterOS 6.3 64位搭建nginx1.3+php5.4.3+mysql5.5.25+tomcat7+jdk7安装
安装mysql5.5.25
1、进入安装文件的目录
2、安装mysql服务端
# rpm -ivh MySQL-server-5.5.25a-1.rhel5.x86_64.rpm
如图:mysql-server安装
安装过程中可能出现后面的错误:error:
Failed dependencies: libaio.so.1()(64bit) is needed by MySQL-server
(蓝色部分可以跳过)
(1) 安装完成后,安装进程会在Linux中添加一个mysql组,以及属于mysql组的用户mysql。可通过id命令查看:
[root@localhost JavaEE]#id mysql
uid=496(mysql)gid=493(mysql) groups=493(mysql)
(2)MySQL服务器安装之后虽然配置了相关文件,但并没有自动启动mysqld服务,需自行启动:[root@localhost JavaEE]#service mysql start
Starting MySQL.. SUCCESS!
(3) 可通过检查端口是否开启来查看MySQL是否正常启动:
[root@localhost JavaEE]#netstat -anp|grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 34693/mysqld
3、安装mysql客户端、mysql-devel
# rpm -ivh MySQL-client-5.5.25a-1.rhel5.x86_64.rpm
# rpm -ivh MySQL-devel-5.5.25a-1.rhel5.x86_64.rpm
如图:mysql-client-devel
启动mysql服务
# service mysql start
3.初始密码问题
安装好mysql之后,一般有两种情况:
第一种情况:为root用户设置了一个随机密码(在CentOS上经常遇到这种情况)
随机密码存放位置:/root/.mysql_secret(这个是隐藏文件,想看密码直接输入:vi /root/.mysql_secret)
文件中的内容如下:
# The random password set for the root user at Fri Feb 6 11:18:43 2015 (local time): eSADSovuu3jDdxs9
#
第一步:取到随机密码登录;
第二步:登录成功后修改密码命令如下:
sql>set passwrod = password("newpassword");
第二种情况:一开始root未设置密码
修改mysql中root的初始化密码
1、命令如下:
# /usr/bin/mysqladmin -u root password ‘rootadmin’
格式:mysqladmin -u用户名 -p旧密码 password 新密码
2、例子
# /usr/bin/mysqladmin -u root password ‘rootadmin’
注:因为开始时root没有密码,所以-p旧密码一项就可以省略了

重启与停止mysql服务
启动方式1:service mysql start
启动方式2:/etc/init.d/mysql start
停止方式1:service mysql stop
停止方式2:/etc/init.d/mysql shutdown
重启方式1:service mysql restart
重启方式2:/etc/init.d/mysql restart
文章作者: iitshare
http://www.iitshare.com/centeros-6-3-64-bit-mysql5-5-25-installation.html

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Improve HDFS performance on CentOS: A comprehensive optimization guide to optimize HDFS (Hadoop distributed file system) on CentOS requires comprehensive consideration of hardware, system configuration and network settings. This article provides a series of optimization strategies to help you improve HDFS performance. 1. Hardware upgrade and selection resource expansion: Increase the CPU, memory and storage capacity of the server as much as possible. High-performance hardware: adopts high-performance network cards and switches to improve network throughput. 2. System configuration fine-tuning kernel parameter adjustment: Modify /etc/sysctl.conf file to optimize kernel parameters such as TCP connection number, file handle number and memory management. For example, adjust TCP connection status and buffer size

The CentOS shutdown command is shutdown, and the syntax is shutdown [Options] Time [Information]. Options include: -h Stop the system immediately; -P Turn off the power after shutdown; -r restart; -t Waiting time. Times can be specified as immediate (now), minutes ( minutes), or a specific time (hh:mm). Added information can be displayed in system messages.

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

Steps to configure IP address in CentOS: View the current network configuration: ip addr Edit the network configuration file: sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 Change IP address: Edit IPADDR= Line changes the subnet mask and gateway (optional): Edit NETMASK= and GATEWAY= Lines Restart the network service: sudo systemctl restart network verification IP address: ip addr

Backup and Recovery Policy of GitLab under CentOS System In order to ensure data security and recoverability, GitLab on CentOS provides a variety of backup methods. This article will introduce several common backup methods, configuration parameters and recovery processes in detail to help you establish a complete GitLab backup and recovery strategy. 1. Manual backup Use the gitlab-rakegitlab:backup:create command to execute manual backup. This command backs up key information such as GitLab repository, database, users, user groups, keys, and permissions. The default backup file is stored in the /var/opt/gitlab/backups directory. You can modify /etc/gitlab

Complete Guide to Checking HDFS Configuration in CentOS Systems This article will guide you how to effectively check the configuration and running status of HDFS on CentOS systems. The following steps will help you fully understand the setup and operation of HDFS. Verify Hadoop environment variable: First, make sure the Hadoop environment variable is set correctly. In the terminal, execute the following command to verify that Hadoop is installed and configured correctly: hadoopversion Check HDFS configuration file: The core configuration file of HDFS is located in the /etc/hadoop/conf/ directory, where core-site.xml and hdfs-site.xml are crucial. use

CentOS will be shut down in 2024 because its upstream distribution, RHEL 8, has been shut down. This shutdown will affect the CentOS 8 system, preventing it from continuing to receive updates. Users should plan for migration, and recommended options include CentOS Stream, AlmaLinux, and Rocky Linux to keep the system safe and stable.

Restarting the network in CentOS 8 requires the following steps: Stop the network service (NetworkManager) and reload the network module (r8169), start the network service (NetworkManager) and check the network status (by ping 8.8.8.8)
