#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. 如何连接虚拟的OneNote打印机

    include <Windows.h> #include <iostream> int main() { HANDLE handle = CreateFile(L"O ...

  2. redis高可用(一)主从复制

    主从复制 读写分离 https://blog.csdn.net/u014691098/article/details/82391608

  3. 用class语法派生Enum并增加描述值的类属性来定义一个新枚举

    import enum class BugStatus(enum.Enum):        new = 7    incomplete = 6    invalid = 5    wont_fix ...

  4. c# linq 分组groupby

    转载: https://www.cnblogs.com/cncc/p/9846390.html 一.先准备要使用的类: 1.Person类: class Person { public string ...

  5. 查看SSL证书的别名

    1.把java目录下的keytool拷贝到证书目录下:2.进入证书目录,然后输入命令keytool -list -v -keystore file.jks -storepass password,发现 ...

  6. sh_12_转义字符

    sh_12_转义字符 # \t 在控制台输出一个 制表符,协助在输出文本时 垂直方向 保持对齐 print("1\t2\t3") print("10\t20\t30&qu ...

  7. 【C++】char* 和 char[] 区别的理解

    string 是一个类,其中有一个 char * 类型的私有变量. 因此可以如下构建一个string类型的变量. string str = "abcd"; 其中,右值“abcd”一 ...

  8. 《数据结构(C语言)》苏小红 课本案例

    期末了,赶紧复习一波,手打一份书上的代码以便随时查阅 第二章: //顺序表存储结构 #define MAXSIZE 100 typedef struct { Elemtype *elemt; int ...

  9. ORA-01034、ORA-27101、ORA-00119错误

    ORA-01034ORA-27101Linux-x86_64 Error: 2:No such file or directory. 或者是 ORA-00119: invalid specificat ...

  10. 一、Spring MVC起步——IntelliJ IDEA 搭建Spring MVC环境(手把手搭建)

    本机环境: JDK 1.7 IntelliJ IDEA 2017.2 1.新建项目 Create New Project ​ 选择Spring MVC ​ 填写项目名和项目存放位置 ​ 然后点击Fin ...