#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. Java内部类的整理。

    Java 内部类 分四种:成员内部类.局部内部类.静态内部类和匿名内部类. 成员内部类: (1)即作为外部类的一个成员存在,与外部类的属性.方法并列. 注意:成员内部类中不能定义静态变量,但可以访问外 ...

  2. git每次更新都需要输入账号密码,如何解决?

    //如果https请求pull每次都需要输入账号密码,则 git config --global credential.helper store   那么,在下一次更新,需要输入账号密码,然后git就 ...

  3. MySQL中添加、修改、删除约束

    https://blog.csdn.net/dz77dz/article/details/82119000 主要包含的约束: 非空.唯一.check.not null.默认值.主键.外键

  4. Python 爬虫插件

    #coding:utf-8import sys,urllib2,re,Queuesys.path.append("..") from lib.Http_Class import H ...

  5. C# 、Java数组申明、初始化区别

    一.数组申明   int[] a1 int a2[] C# 支持 不支持 Java 支持 支持 二.数组申明且初始化    int[] a1 = new int[] { 2, 31 } int a1[ ...

  6. maven项目解决pom.xml头部 http://maven.apache.org/xsd/maven-4.0.0.xsd报错的问题

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/qq_36611526/article/d ...

  7. 11.Linux date命令的用法

    date命令常的日常应用   修改时间 date -s “2008/05/23 19:20″ 打包文件 tar zcvf log-$(date +$F).gz /home/admin/logs 同步阿 ...

  8. 解决"'pip' 不是内部或外部命令,也不是可运行的程序或批处理文件"的问题

    大家好,我是Connor,今天我为大家带来解决CMD命令无法直接运行 '点子' 进行安装库的问题. 今天本来想安装库来着,但是苦于pycharm的设置里不知道出了什么原因,无奈只能使用PIP功能来安装 ...

  9. 【模板】【数论】二次剩余Cipolla算法,离散对数BSGS 算法

    Cipolla LL ksm(LL k,LL n) { LL s=1; for(;n;n>>=1,k=k*k%mo) if(n&1) s=s*k%mo; return s; } n ...

  10. Spring Data JPA(一)简介

    Spring Data JPA介绍 可以理解为JPA规范的再次封装抽象,底层还是使用了Hibernate的JPA技术实现,引用JPQL(Java Persistence Query Language) ...