我的编程空间,编程开发者的网络收藏夹
学习永远不晚

mysql-5.1.72安装配置

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

mysql-5.1.72安装配置

一、系统环境
a、系统Centos 6.5 X64位

[root@mytest ~]# uname -a
Linux mytest 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

mysql 文件包: mysql-5.1.72
b、需要软件
mysql-5.1.72.tar ncurses.tar
二,安装
对下载的包进行解压操作安装:

[root@myser tools]# tar xf mysql-5.1.72.tar.gz
[root@myser alidata]# ls  
mysql-5.1.72  mysql-5.1.72.tar.gz
[root@myser tools]# cd mysql-5.1.72  

[root@myser mysql-5.1.72]# ./configure --prefix=/application/mysql
在安装的这里会报错,提示
checking for termcap functions library... configure: error: No curses/termcap library found

提示缺少curses程序,
[root@myser mysql-5.1.72]# yum install ncurses-devel -y
然后在重新运行上面安装的命令。
[root@myser mysql-5.1.72]# ./configure --prefix=/application/mysql
。。。
。。
/bin/rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands

Thank you for choosing MySQL!

Remember to check the platform specific part of the reference manual
for hints about installing MySQL on your platform.
Also have a look at the files in the Docs directory.
提示已经安装完成,
现在进行编译
[root@myser mysql-5.1.72]# make &&make install #这步时间会很长
[root@myser support-files]# pwd
/root/alidata/mysql-5.1.72/support-files
[root@myser mysql-5.1.72]# cd support-files/
[root@myser support-files]# cp my-small.cnf /etc/my.cnf
cp: overwrite /etc/my.cnf'? y
[root@myser support-files]# cp mysql.server.sh /etc/init.d/mysqld
[root@myser support-files]# mkdir /application/mysql/data #创建mysql数据文件存放目录
[root@myser support-files]# groupadd mysql #创建mysql组
[root@myser support-files]# useradd -g mysql -M -s /sbin/nologin #创建mysql用户属于mysql组,且不配置家目录并且不登录
[root@myser support-files]# chown -R mysql.mysql /application/mysql/ #配置data 目录权限

三,对数据库初始化操作
[root@myser support-files]# /application/mysql/bin/mysql_install_db --basedir=/application/mysql/ --datadir=/application/mysql/data/ --user=mysql
WARNING: The host 'myser' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
180102 16:43:02 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
OK
Filling help tables...
180102 16:43:03 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/application/mysql//bin/mysqladmin -u root password 'new-password'
/application/mysql//bin/mysqladmin -u root -h myser password 'new-password'

Alternatively you can run:
/application/mysql//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.

You can start the MySQL daemon with:
cd /application/mysql/ ; /application/mysql//bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /application/mysql//mysql-test ; perl mysql-test-run.pl

Please report any problems with the /application/mysql//scripts/mysqlbug script!

[root@myser support-files]# /application/mysql/bin/mysqld_safe & 启动数据库
[1] 52951
[root@myser support-files]# 180102 16:44:20 mysqld_safe Logging to '/application/mysql/data/myser.err'.
180102 16:44:20 mysqld_safe Starting mysqld daemon with databases from /application/mysql/data
查看是否启动并检查端口
[root@myser support-files]# netstat -lntpu|grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 53056/mysqld

[root@myser support-files]# chkconfig --add mysqld   
[root@myser support-files]# chkconfig mysqld on   
[root@myser support-files]# chmod +x /etc/init.d/mysqld 

mysql的结束进程
[root@myser support-files]# pkill mysql

第二种启动mysql
先对mysql文件进行编辑
[root@myser tmp]# vi /etc/init.d/mysqld
# overwritten by settings in the MySQL configuration files.

basedir=/application/mysql
datadir=/application/mysql/data

# Default value, in seconds, afterwhich the script should timeout waiting
# for server start.

[root@myser tmp]# vi /etc/profile
PATH="/application/mysql/bin/:$PATH" #添加到文件结尾:
[root@myser tmp]# source /etc/init.d/mysqld
[root@myser tmp]# /etc/init.d/mysqld start
/etc/init.d/mysqld: line 270: @HOSTNAME@: command not found
/etc/init.d/mysqld: line 279: @HOSTNAME@: command not found
Starting MySQL. SUCCESS!
[root@myser tmp]# /etc/init.d/mysqld stop
/etc/init.d/mysqld: line 270: @HOSTNAME@: command not found
/etc/init.d/mysqld: line 279: @HOSTNAME@: command not found
Shutting down MySQL. SUCCESS!
[root@myser tmp]# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 1368/sshd
tcp 0 0 0.0.0.0:9191 0.0.0.0:
LISTEN 1354/procstart

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

mysql-5.1.72安装配置

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

MySql安装配置

一、准备工作:1、MySql; 下载地址:https://pan.baidu.com/s/1_jGonvoX8E7JMw1fgA9nZg 提取码:rx9a二、安装MySql:1、点击程序运行,选择“自定义”,点击“下一步”2、选择对应MySql版本,点击“下一
MySql安装配置
2019-04-04

MySQL:安装与配置

一、MySQL安装0、下载社区版安装包官网下载地址:https://dev.mysql.com/downloads/installer/ 1、进入安装页面,这里不选择默认安装的所有工具,仅选择Server only。 2、如果没有VC++环境就点击execut

	MySQL:安装与配置
2017-03-30

免安装mysql配置

1、下载压缩包:去官网下载免安装的MySQL的压缩包http://dev.mysql.com/downloads/mysql/根据机器选择64位或者32位: 2、解压到相应目录。我解压到了D:\Program Files (x86)下
2022-05-18

mysql怎么配置安装

在 linux 系统中,按照以下步骤安装 mysql:更新系统包,再安装 mysql,然后启动服务;在 windows 系统中,从官网下载安装包并按照提示操作即可。mysql 的配置信息存储在 my.cnf 或 my.ini 文件中,常见配
mysql怎么配置安装
2024-04-14

MySQL的安装与配置

1970年,在IBM公司工作的数学家 E.F.Codd 发表了数学论文 《大型共享数据库的关系数据模型》 ,首次提出关系和关系运算的概念,奠定了关系型数据库的理论模型。1973年,IBM公司增加了更多的研究人员研究这个项目,这个项目就是著名的 System R
MySQL的安装与配置
2017-08-11

Linux mysql安装配置教程 linux中mysql最新安装配置教程

本篇文章提供了在 linux 系统中安装和配置 mysql 数据库的详细教程。该教程适用于希望在 linux 服务器或个人计算机上运行 mysql 数据库的用户,涵盖从安装 mysql 软件包到配置服务器和数据库实例的各个步骤。通过遵循本教
Linux mysql安装配置教程 linux中mysql最新安装配置教程
2024-10-17

Linux下MySQL安装配置 MySQL配置参数详解

一、下载编译安装 #cd /usr/local/src/ #wget http://mysql.byungsoo.net/Downloads/MySQL-5.1/mysql-5.1.38.tar.gz #tar –xzvf mysql-5.1.38.tar.g
Linux下MySQL安装配置 MySQL配置参数详解
2015-11-24

编程热搜

目录