`

安装mysql压缩包记录

阅读更多

安装mysql记录

[root@eegooserver3 ~]# groupadd mysql

[root@eegooserver3 ~]# useradd -g mysql mysql

[root@eegooserver3 ~]# cd /opt

[root@eegooserver3 opt]# tar zxvf mysql-5.1.63-linux-x86_64-glibc23.tar.gz

[root@eegooserver3 opt]# mv /opt/mysql-5.1.63-linux-x86_64-glibc23 /usr/local/mysql

[root@eegooserver3 opt]# cd /usr/local/mysql/

[root@eegooserver3 mysql]# ll

total 76

drwxr-xr-x.  2 7155 wheel  4096 Apr 16 16:57 bin

-rw-r--r--.  1 7155 wheel 17987 Apr 16 16:57 COPYING

drwxr-x---.  4 7155 wheel  4096 Apr 16 16:57 data

drwxr-xr-x.  2 7155 wheel  4096 Apr 16 16:54 docs

drwxr-xr-x.  2 7155 wheel  4096 Apr 16 16:54 include

-rw-r--r--.  1 7155 wheel  7605 Apr 16 16:57 INSTALL-BINARY

drwxr-xr-x.  3 7155 wheel  4096 Apr 16 16:57 lib

drwxr-xr-x.  4 7155 wheel  4096 Apr 16 16:55 man

drwxr-xr-x. 10 7155 wheel  4096 Apr 16 16:57 mysql-test

-rw-r--r--.  1 7155 wheel  2552 Apr 16 16:57 README

drwxr-xr-x.  2 7155 wheel  4096 Apr 16 16:57 scripts

drwxr-xr-x. 27 7155 wheel  4096 Apr 16 16:57 share

drwxr-xr-x.  5 7155 wheel  4096 Apr 16 16:57 sql-bench

drwxr-xr-x.  2 7155 wheel  4096 Apr 16 16:57 support-files

[root@eegooserver3 mysql]# chown -R mysql .

[root@eegooserver3 mysql]# chgrp -R mysql .

[root@eegooserver3 mysql]# cp support-files/my-huge.cnf /etc/my.cnf [root@eegooserver3 mysql]# 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 eegooserver3 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!

 

[root@eegooserver3 mysql]# chown -R root .

[root@eegooserver3 mysql]# chown -R mysql data

[root@eegooserver3 mysql]# ln -s /usr/local/mysql/bin/mysqld_safe /usr/local/bin

[root@eegooserver3 mysql]# ln -s /usr/local/mysql/bin/mysql /usr/local/bin

[root@eegooserver3 mysql]# ln -s /usr/local/mysql/bin/mysqldump /usr/local/bin

[root@eegooserver3 mysql]# bin/mysqld_safe --user=mysql &

[1] 5425

[root@eegooserver3 mysql]# 120827 22:43:45 mysqld_safe Logging to '/usr/local/mysql/data/eegooserver3.err'.

120827 22:43:45 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

^C

[root@eegooserver3 mysql]# /usr/local/mysql/bin/mysqladmin -u root password 123456

[root@eegooserver3 mysql]# mysql -u root -p

Enter password: 123456

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.1.63-log MySQL Community Server (GPL)

 

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

 

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

 

mysql> select user,host,password from mysql.user;

+------+--------------+----------+

| user | host         | password |

+------+--------------+----------+

| root | localhost    |          |

| root | eegooserver3 |          |

| root | 127.0.0.1    |          |

|      | localhost    |          |

|      | eegooserver3 |          |

+------+--------------+----------+

5 rows in set (0.00 sec)

 

mysql> grant all on *.* to root@'%' identified by '123456';

Query OK, 0 rows affected (0.00 sec)

 

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

 

mysql> exit;

Bye

[root@eegooserver3 mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysqld

[root@eegooserver3 mysql]# chmod 700 /etc/init.d/mysqld

[root@eegooserver3 mysql]#chkconfig --add mysqld

[root@eegooserver3 mysql]# chkconfig --level 345 mysqld on

[root@eegooserver3 mysql]# chkconfig --list mysqld

4
1
分享到:
评论
2 楼 yubuzhi 2013-03-27  
是 INSTALL-BINARY 这个文件
1 楼 dcgame 2013-03-25  
按压缩包里的readme文档里的口令做就行。

相关推荐

    Linux安装mysql压缩包安装

    下面记录了我在Linux环境下安装Mysql的完整过程,实操记录,绝非水文,如有错误或遗漏,欢迎指正。 安装中遇到的问题是第6步,编辑配置文件my.cnf,添加配置如下全部更换,或者把以前的注释掉。 datadir=/usr/...

    mysql压缩包板安装记录

    本次安装记录详细介绍了如何在Windows操作系统上安装MySQL 8.0.13版本,并通过一个具体的实例来展示整个安装过程,旨在帮助用户顺利完成MySQL的部署工作。 #### 安装环境与准备 - **操作系统**: Windows x64 - **...

    bat一键安装mysql

    7. **记录日志**:`install_log.txt`文件可能用于记录安装过程中的日志信息,方便后期排查问题。 8. **其他文件**:`COPYING`文件通常包含软件的许可证信息,`点击读我.txt`可能是提供安装指南或注意事项的文档,而...

    mysql安装包及教程

    在本教程中,我们将深入探讨MySQL的安装过程,并提供在Windows 7, 8, 10操作系统上的安装步骤。此外,我们还将讨论MySQL的API,以便开发者能够更好地与数据库进行交互。 首先,让我们来了解MySQL的安装过程: 1. *...

    mysql-8.0.19-winx64压缩包版本.rar

    1. **解压安装**:下载的“mysql-8.0.19-winx64”压缩包解压后,包含了所有必要的文件和组件。 2. **初始化数据库**:执行MySQL Server的初始化脚本,设置root用户的密码和其他配置。 3. **配置my.ini**:根据需求...

    mysql解压包以及安装包.zip

    这个压缩包“mysql解压包以及安装包.zip”包含了MySQL的安装文件和可能的配置文件,为用户提供了在本地计算机上安装和配置MySQL的完整流程。下面我们将深入探讨MySQL的下载、安装及配置过程。 首先,我们来了解一下...

    aarch64架构下mysql数据库安装.zip

    而在新兴的aarch64(ARM64)架构上,MySQL的安装与传统x86平台有所不同。本文将详细介绍如何在aarch64架构下进行MySQL数据库的安装。 首先,让我们了解一下aarch64架构。aarch64是ARM公司为64位计算设计的一种指令...

    统信系统(UOS)arm64 MySQL离线安装包(亲测,没有任何问题)

    安装MySQL时,确保遵循最佳安全实践,如设置强壮的root用户密码,限制远程访问,以及启用日志记录,以便监控和排查潜在问题。 6. **简易安装命令** 提供的简易安装命令可能包括创建数据目录、设置权限、初始化...

    mysql安装部署,安装配置

    在安装 MySQL 之前,需要先上传 RPM 安装压缩包到服务器的指定目录下。 2. 查看是否已经安装 mariadb 或 mysql,已安则卸载 在安装 MySQL 之前,需要先检查是否已经安装了 mariadb 或 mysql,如果已经安装则需要...

    Windows系统如何安装Mysql_5.7.36-winx64免安装版

    首先,你需要下载MySQL_5.7.36-winx64的压缩包,并将其解压到一个适合的位置,如`C:\Program Files\MySQL`。这个目录下的文件包含了MySQL服务器的所有必需组件。 接着,我们需要配置系统环境变量以便能够通过命令行...

    mysql文件及安装说明.rar

    在这个名为"mysql文件及安装说明.rar"的压缩包中,你将找到32位和64位的MySQL安装程序,适用于不同的操作系统环境。 首先,安装MySQL的过程通常包括以下步骤: 1. 下载:根据你的操作系统选择合适的安装文件,32位...

    Mysql 教程 - mac 安装 Mysql 教程.pdf

    2. 通过命令 ps -ef | grep mysql 查看服务是否启动,如果有多条记录输出到命令行面板,说明服务启动了。 配置环境变量 在服务启动中,MySQL 命令找不到,需要配置环境变量。可以编辑 .bash_profile 文件,添加...

    mysql8.0压缩包

    这个“mysql8.0压缩包”包含了Windows 64位系统的安装文件,具体为“mysql-8.0.25-winx64”,这使得用户能够方便地在Windows环境下部署和运行MySQL 8.0服务器。 首先,让我们详细了解一下MySQL 8.0的主要特性: 1....

    mysql作业记录档案

    【标题】:“mysql作业记录档案”揭示了这个压缩包文件主要包含了与MySQL数据库相关的作业记录。这可能包括了用户在操作MySQL数据库时的各种任务、实验或者项目,旨在帮助记录和回顾学习或工作过程。 【描述】:...

Global site tag (gtag.js) - Google Analytics