`

安装mysql-5.0

阅读更多

Linux (non RPM packages) downloads (platform notes)
Linux (x86)        5.1.40    120.8M    Download | Pick a mirror

click "Pick a mirror" and select your closest mirror from the lists below by your sources.list
check the size whether matches the size in the list
otherwise mistakes will occur while installing...

mysql-5.1.40-linux-i686-glibc23(2).tar.gz改名为mysql-5.1.40-linux-i686.tar.gz,便于解压



==========================================================================================================================
hi I am system admin in turkey and same problems had happenned on my system.
If you use mysql-5.0, you can setup it without any problem. I aggre with you that there is a problem in their mysql-5.1.40 setup-script.
==========================================================================================================================

下载mysql-5.0
http://dev.mysql.com/downloads/
MySQL 5.0 — Previous GA release=>Linux (non RPM, Intel C/C++ compiled, glibc-2.3)=>
Linux (x86)        5.0.88    110.5M    Download | Pick a mirror=>Pick a mirror

click "Pick a mirror" and select your closest mirror from the lists below by your sources.list
check the size whether matches the size in the list
otherwise mistakes will occur while installing...

mysql-5.0.88-linux-i686-icc-glibc23.tar.gz在/home/tongxiaoming520/applications/中



安装笔记:

1.首先添加mysql用户组
tongxiaoming520@tongxiaoming520-laptop:~$ groupadd mysql

2.添加mysql用户,并指定到mysql用户组
tongxiaoming520@tongxiaoming520-laptop:~$ useradd -g mysql mysql

3.解压缩mysql-5.0.88-linux-i686-icc-glibc23.tar.gz到安装目录(/usr/local/)
tongxiaoming520@tongxiaoming520-laptop:~$ cd /usr/local
tongxiaoming520@tongxiaoming520-laptop:/usr/local$ sudo tar zxvf /home/tongxiaoming520/applications/mysql-5.0.88-linux-i686-icc-glibc23.tar.gz
tongxiaoming520@tongxiaoming520-laptop:/usr/local$ ls

4.创建mysql软连接mysql-VERSION-OS
tongxiaoming520@tongxiaoming520-laptop:/usr/local$ sudo ln -s /usr/local/mysql-5.0.88-linux-i686-icc-glibc23 mysql
tongxiaoming520@tongxiaoming520-laptop:/usr/local$ cd mysql
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ ls

5.设定mysql安装目录权限,设置owner为mysql
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo chown -R mysql .
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo chgrp -R mysql .

6.执行mysql系统数据库初始化脚本
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo scripts/mysql_install_db --user=mysql

7.设定data目录权限,分配给mysql用户,为了mysql程序能读写data目录下的文件
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo chown -R root .
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo chown -R mysql data 


8.使用mysql帐号启动mysql应用
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo bin/mysqld_safe --user=mysql & 

9.设置root密码
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo bin/mysqladmin -u root password '123123' 


10.登录mysql
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ bin/mysql -u root -p 
Enter password:  
登录成功会看到:
1. Welcome to the MySQL monitor.  Commands end with ; or \g. 
2. Your MySQL connection id is 229 
3. Server version: 5.1.40-log MySQL Community Server (GPL) 
4.  
5. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
6.  
7. mysql>  

这时mysql已经装好了,可以查看数据库了,但在正式使用数据库开发与部署的时候还需要做一些工作:


1.设定配置文件my.cnf

    按照需求copy my-***.cnf到/etc/my.cnf
   把mysql/support-files/my-medium.cnf拷贝到/etc/my.cnf,再去修改/etc/my.cnf的配置。

2.修改默认字符集utf8

    (1).[client]下加入default-character-set=utf8
    (2).[mysqld]下加入default-character-set=utf8

3.设置默认存储引擎
     mysql for linux的版本默认使用的数据库引擎是MyISAM,但只有InnoDB引擎支持事务,
所以需要修改配置:

    (1).[mysqld]下加入default-storage-engine=INNODB

4.配置innodb参数
 

    (1).找到# Uncomment the following if you are using InnoDB tables
        去掉innodb_*下的所有#

    (2).如果安装mysql的目录不是默认的,则需要修改
        # mysql 默认安装目录为 /usr/local/mysql/
        # mysql 默认表空间目录安装目录为 /usr/local/mysql/data/

        innodb_data_home_dir=/usr/local/database/mysql/data/
        innodb_log_group_home_dir=/usr/local/database/mysql/data/

5.设置系统服务

    让linux启动的时候就启动mysql服务
Shell代码

   1. shell> cd /usr/local/mysql/ 
   2. shell> cp support-files/mysql.server /etc/init.d/mysql 
   3. shell> chmod 777 /etc/init.d/mysql  
   4. shell> chkconfig --add mysql 
   5. shell> chkconfig --level 35 mysql on 







每次手动启动mysql服务
tongxiaoming520@tongxiaoming520-laptop:~$ cd /usr/local/mysql
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo chown -R mysql data
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo bin/mysqld_safe --user=mysql &
[1] 6468
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ nohup: 忽略输入重定向错误到标准输出端
Starting mysqld daemon with databases from /usr/local/mysql-5.0.88-linux-i686-icc-glibc23/data


tongxiaoming520@tongxiaoming520-laptop:~$ ps -A | grep mysql
 6468 pts/0    00:00:00 mysqld_safe
 6491 pts/0    00:00:00 mysqld
tongxiaoming520@tongxiaoming520-laptop:~$ cd /usr/local/mysql
tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ bin/mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.88 MySQL Community Server (GPL)

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

mysql>











tongxiaoming520@tongxiaoming520-laptop:/usr/local/mysql$ sudo scripts/mysql_install_db --user=mysql                                              
Installing MySQL system tables...                                       
OK                                                                      
Filling help tables...                                                  
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:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h tongxiaoming520-laptop password 'new-password'

Alternatively you can run:
./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 . ; ./bin/mysqld_safe &

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

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com

分享到:
评论

相关推荐

    mysql-5.0.75.tar.gz

    描述中提到的"tar -zxvf mysql-5.0.75.tar.gz"是解压和安装MySQL 5.0.75的命令。这里逐一解释这个命令的组成部分: 1. `tar`:这是一个在Linux和Unix系统中用于处理归档文件的工具,可以创建、修改或提取tar文件。 ...

    mysql-gui-tools-5.0-r12-win32

    mysql-gui-tools-5.0-r12-win32.msi mysql官方gui开发工具

    mysql-connector-java-5.0.X.rar

    这个压缩包“mysql-connector-java-5.0.X.rar”包含的是不同版本的MySQL JDBC(Java Database Connectivity)驱动,允许Java开发者在他们的应用中无缝地连接到MySQL数据库。 JDBC驱动是Java平台上的一个标准接口,...

    mysql-gui-tools-5.0-r12-win32.rarMySql的GUI图形工具

    安装文件`mysql-gui-tools-5.0-r12-win32.msi`是Windows安装程序,用于在Windows操作系统上部署这些工具。在安装过程中,用户可以选择要安装的特定工具,根据实际需求定制安装。安装完成后,可以通过开始菜单或桌面...

    mysql-5.0.tar.gz

    本文将深入探讨MySQL 5.0在Linux环境下的源码安装过程,以及其对嵌入式开发的意义。 首先,我们需要了解`mysql-5.0.tar.gz`文件。这是一个使用tar归档工具打包,并使用gzip压缩的文件,通常用于在Linux或类Unix系统...

    mysql-connector-net-5.0.8.1

    mysql-connector-net-5.0.8.1

    mysql-gui-tools-5.0-r10-win32

    mysql的gui工具,mysql-gui-tools-5.0-r10-win32,提供给大家下载.

    mysql-gui-tools-5.0-r2-win32.msi

    mysql-gui-tools-5.0-r2-win32.msi

    .net连接mysql 驱动包mysql-connector-net-5.0.8.1.rar

    .net连接mysql 驱动包mysql-connector-net-5.0.8.1.rar 用法请参照我的博客: http://hi.baidu.com/sundongsheng/blog/item/f5878c0012107115738b6575.html

    benchmarksql-5.0-mysql-support-opt.zip

    为了克服这一限制,开发人员对BenchmarkSQL 5.0进行了修改,增加了对MySQL的支持,形成了我们今天讨论的"benchmarksql-5.0-mysql-support-opt.zip"压缩包。 这个优化版的BenchmarkSQL主要针对以下几个方面进行了...

    mysql-5.0.81.tar.gz

    MySQL是世界上最受欢迎的...总结,`mysql-5.0.81.tar.gz`是MySQL 5.0.81版本的源码包,在Linux下安装涉及解压、配置、编译、安装、初始化、设置权限等多个步骤。源码安装虽然复杂,但也提供了更大的灵活性和定制性。

    zabbix-release-5.0-1.el7.noarch.rpm

    Zabbix5.0LTS rpm安装包 rpm -Uvh zabbix-release-5.0-1.el7.noarch.rpm yum install zabbix-server-mysql zabbix-agent

    mysql-gui-tools-5.0-r17 的数据库管理工具

    MySQL-GUI-Tools 5.0-r17 是一套针对MySQL数据库系统的图形用户界面工具集,主要用于方便数据库管理员和开发人员进行数据管理、查询、备份和恢复等操作。这套工具包在MySQL 5.0版本的时代发布,包含了多个实用工具,...

    mysql-5.0-jar

    "mysql-5.0-jar"这个标题意味着我们将讨论的是MySQL Connector/J的5.0版本,这是MySQL官方提供的用于Java应用程序与MySQL数据库通信的驱动程序。 描述中提到有两个版本的JAR包,分别是`mysql-*-5.0.0.jar`和`mysql-...

    mysql-gui-tools-5.0r12-rhel4-i386.tar.gz_MYSQL_MySQL GUI Tools l

    MySQL GUI Tools 5.0r12-rhel4-i386.tar.gz 是一个针对Linux系统,特别是Fedora发行版的MySQL图形化管理工具集合。这个压缩包包含了四个主要的MySQL管理工具,分别是: 1. **mysql-gui-tools-5.0r12-1rhel4.i386....

    mysql-gui-tools-5.0-r17-win32

    MySQL GUI Tools 5.0 r17 是一套用于Windows操作系统的数据库管理工具,它提供了图形化的界面,使得MySQL数据库的管理和开发变得更加直观和便捷。这个软件包是专为MySQL 5.0版本设计的,旨在提供高效且用户友好的...

    mysql-gui-tools-noinstall-5.0-r17-win32.rar

    这个压缩包"mysql-gui-tools-noinstall-5.0-r17-win32.rar"包含了四个核心组件,分别适用于不同的数据库任务: 1. **MySQL System Tray Monitor**: 这是MySQL的系统托盘监控工具,允许用户在Windows任务栏的通知...

    PHPWind-Wamp-5.0.rar_WAMP 5.0_mental7hp_phpwind

    在这个版本中,我们看到的是WAMP 5.0,它包括了Apache HTTP Server 5.0、MySQL数据库和PHP编程语言。Apache是世界上最广泛使用的Web服务器软件,能够处理静态HTML文件和动态内容,如PHP脚本。MySQL是一个功能强大的...

Global site tag (gtag.js) - Google Analytics