#cd /usr/local/src

# tar xvzf mysql-5.1.34.tar.gz

# cd mysql-5.5.1.34

配置和编译

#chmod +x configure

# ./configure --prefix=/usr/local/mysql --enable-local-infile

#make

make时会提示有abi相关的错误,在makefile文件中的最后,将abi相关的部分删除即可

#make install

安装选项文件,将当前文件作为模板

#cp support-files/my-medium.cnf /etc/my.cnf

设置mysql权限

#cd /usr/local/mysql

#chown -R mysql .

#chgrp -R mysql .

新建mysql允许的表

#/usr/local/mysql/bin/mysql_install_db --user=mysql

#chown -R mysql var

设置mysql开机自启动:

# cp /usr/local/src/mysql-5.1.34/support-files/mysql.server /etc/rc.d/init.d/mysql

#chmod +x /etc/rc.d/init.d/mysql

#chkconfig --add mysql

测试并运行mysql

#/usr/local/mysql/bin/mysqld_safe --user=mysql &

#service mysql start

修改mysql管理员密码
#/usr/local/mysql/bin/mysqladmin -u root password password

使用用户登录mysql
# /usr/local/mysql/bin/mysql -u root -p

链接mysql代码

# cd /usr/local/mysql/bin/
#for file in *;
> do 
> ln -s /usr/local/mysql/bin/$file /usr/bin/$file;
> done

测试mysql在任意地点能启动mysql:

#cd

# mysql -u root -p

Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.1.34-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

查看端口3306

#netstat -atln

debian下安装mysql 5.1.34的更多相关文章

  1. debian下安装mysql

    apt-get install mysql-client mysql-server 中间会要你设置password,设置后后就自己主动启动mysql了 能够用ps -ef|grep mysql 这样能 ...

  2. Debian下安装Firefox与flash简介

    Debian下安装Firefox与flash简介 由于Debian在Firefox的版权上出现了问题,导致官方发布的Debian系统不能使用默认的Firefox浏览器,最后官方重编的Firefox改名 ...

  3. 在Ubuntu 18.04 下安装mysql,没有初始密码,重设root密码

    在Ubuntu 18.04 下安装mysql 不知道是由于mysql更新为新版还是.Ubuntu18.04中的特性,安装过程中没有设置密码的环节,在网络上找了半天,总算解决了!特此记录下来,以便以后查 ...

  4. Mac下安装MySQL 5.6.40

    Mac下安装MySQL 5.6.40 - 干勾鱼的CSDN博客 - CSDN博客   原创 Mac下安装MySQL 5.6.40 2018-06-18 10:34:03 我是干勾鱼 阅读数 5927 ...

  5. CentOS 7 下安装 MySQL 8.x

    CentOS 7 下安装 MySQL 8.x 作者:Grey 原文地址: 博客园:CentOS 7 下安装 MySQL 8.x CSDN:CentOS 7 下安装 MySQL 8.x 环境 CentO ...

  6. Linux下安装 MySQL

    Ubuntu环境 使用二进制安装包安装,相对简单绿色 1.到官网下载二进制压缩包http://dev.mysql.com/downloads/mysql/ 2.选择需要的版本 目前最新为5.7.之后选 ...

  7. Ubuntu 下安装 Mysql

    这里讲用Ubuntu下安装MySql ubuntu上安装mysql非常简单只需要几条命令就可以完成. 1. sudo apt-get install mysql-server   2. apt-get ...

  8. ubuntu 下安装mysql,以及配置远程登录

    安装MysQL 在Ubuntu14.04下安装MySQL比较简单,只需下面这条命令就行了: 1.输入 sudo apt-get install mysql-server 2.继续执行后,需要设定MyS ...

  9. CentOS7下安装Mysql和Memcached 以及 使用C#操作Mysql和Memcached

    我本身是学.net的,但是现在很多主流SQL和NOSQL都是部置在linux下,本着好学的精神,前段时间装了个虚拟机,在其装上CentOS64位的服务器系统,对于英文0基础,linux0基础的我来说, ...

随机推荐

  1. ESP-8266 串口通信(Serial)

    ESP8266的串口通信与传统的Arduino设备完全一样.除了硬件FIFO(128字节用于TX和RX)之外,硬件串口还有额外的 256字节的TX和RX缓存.发送和接收全都由中断驱动.当FIFO/缓存 ...

  2. NOIP提高组2016总结

    前言 大翻车! 300--: day1 8:30~9:00, 照常看题,思考. 9:00~9:15, 搞定第一题,很水. 9:15~9:45, 思考第二题,我考虑用分深度来处理,想出个个玄学暴力,但刚 ...

  3. vue 搜索关键词 变颜色

    <a class="text"> <span>{{item.name.slice(0,item.name.toLowerCase().indexOf(inp ...

  4. postman—使用newman来执行postman脚本

    我们知道postman是基于javascript语言编写的,而导出的json格式的postman脚本也无法直接在服务器运行,它需要在newman中执行(可以把newman看做postman脚本的运行环 ...

  5. z-tree的使用

    1.参考资料 1)官网:http://www.treejs.cn/v3/api.php 2)z-tree码云:https://gitee.com/zTree/zTree_v3 2.下载解压 案例演示: ...

  6. BZOJ 3398: [Usaco2009 Feb]Bullcow 牡牛和牝牛 水题~

    水~ #include <cstdio> #define N 100004 #define mod 5000011 #define setIO(s) freopen(s".in& ...

  7. 箱排序(Bin Sort)

    1.基本思想 排序过程无须比较关键字,而是通过"分配"和"收集"过程来实现排序.它们的时间复杂度可达到线性阶:O(n). 箱排序也称桶排序(Bucket Sor ...

  8. 为什么C++中只有指针和引用才能实现多态?

    代码: class A { public: virtual void Debug(){} }; class B:public A { public: virtual void Debug(){} }; ...

  9. CDOJ 1059 秋实大哥与小朋友 STL(set)+离散化+BIT区间更新单点查询

    链接: A - 秋实大哥与小朋友 Time Limit:1000MS     Memory Limit:65535KB     64bit IO Format:%lld & %llu Subm ...

  10. Ajax异步提交的步骤

    1.创建XHR对象 ,XMLHttpRequest(该对象负责悄悄滴与服务器进行交互): 2.设置响应函数/回调函数(响应函数规定对返回自服务器的信息如何进行处理): 3.通过xmlhttp.open ...