Linux下mysql下载安装
2014-09-19 11:36
302 查看
一:下载软件
--个人机器为:Redhat 4,32位下载地址为:http://dev.mysql.com/downloads/mysql/5.0.html,打开此网页,下拉网页找到“Linux -Generic”项
找到“Server”和“Client ”项,进行下载
--请选择适合自己机器的,进行下载,这里选择了32位的
--需要登录,才能下载。
二:将软件包上传到Linux里面
点击xmanager的传输按钮(也可以用smb服务或者secure crt软件传输)--左边标红处为windows端软件所在路径,右边为Linux端软件所在路径
[root@target_pc ~]# cd /home/oracle/software
[root@target_pc software]# ls
MySQL-client-5.6.20-1.linux_glibc2.5.i386.rpm MySQL-server-5.6.20-1.linux_glibc2.5.i386.rpm
三:安装mysql
[root@target_pc software]# rpm -ivh MySQL-server-5.6.20-1.linux_glibc2.5.i386.rpmPreparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
2014-09-18 22:37:05 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-09-18 22:37:05 2676 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2014-09-18 22:37:05 2676 [Note] InnoDB: The InnoDB memory heap is disabled
2014-09-18 22:37:05 2676 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2014-09-18 22:37:05 2676 [Note] InnoDB: Memory barrier is not used
2014-09-18 22:37:05 2676 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-09-18 22:37:05 2676 [Note] InnoDB: Using Linux native AIO
2014-09-18 22:37:05 2676 [Note] InnoDB: Not using CPU crc32 instructions
2014-09-18 22:37:05 2676 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-09-18 22:37:05 2676 [Note] InnoDB: Completed initialization of buffer pool
2014-09-18 22:37:05 2676 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2014-09-18 22:37:05 2676 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2014-09-18 22:37:05 2676 [Note] InnoDB: Database physically writes the file full: wait...
2014-09-18 22:37:05 2676 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2014-09-18 22:37:05 2676 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2014-09-18 22:37:05 2676 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2014-09-18 22:37:05 2676 [Warning] InnoDB: New log files created, LSN=45781
2014-09-18 22:37:05 2676 [Note] InnoDB: Doublewrite buffer not found: creating new
2014-09-18 22:37:05 2676 [Note] InnoDB: Doublewrite buffer created
2014-09-18 22:37:05 2676 [Note] InnoDB: 128 rollback segment(s) are active.
2014-09-18 22:37:05 2676 [Warning] InnoDB: Creating foreign key constraint system tables.
2014-09-18 22:37:05 2676 [Note] InnoDB: Foreign key constraint system tables created
2014-09-18 22:37:05 2676 [Note] InnoDB: Creating tablespace and datafile system tables.
2014-09-18 22:37:05 2676 [Note] InnoDB: Tablespace and datafile system tables created.
2014-09-18 22:37:05 2676 [Note] InnoDB: Waiting for purge to start
2014-09-18 22:37:06 2676 [Note] InnoDB: 5.6.20 started; log sequence number 0
A random root password has been set. You will find it in '/root/.mysql_secret'.
2014-09-18 22:37:06 2676 [Note] Binlog end
2014-09-18 22:37:06 2676 [Note] InnoDB: FTS optimize thread exiting.
2014-09-18 22:37:06 2676 [Note] InnoDB: Starting shutdown...
2014-09-18 22:37:07 2676 [Note] InnoDB: Shutdown completed; log sequence number 1625977
2014-09-18 22:37:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-09-18 22:37:07 2698 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2014-09-18 22:37:07 2698 [Note] InnoDB: The InnoDB memory heap is disabled
2014-09-18 22:37:07 2698 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2014-09-18 22:37:07 2698 [Note] InnoDB: Memory barrier is not used
2014-09-18 22:37:07 2698 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-09-18 22:37:07 2698 [Note] InnoDB: Using Linux native AIO
2014-09-18 22:37:07 2698 [Note] InnoDB: Not using CPU crc32 instructions
2014-09-18 22:37:07 2698 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-09-18 22:37:07 2698 [Note] InnoDB: Completed initialization of buffer pool
2014-09-18 22:37:07 2698 [Note] InnoDB: Highest supported file format is Barracuda.
2014-09-18 22:37:07 2698 [Note] InnoDB: 128 rollback segment(s) are active.
2014-09-18 22:37:07 2698 [Note] InnoDB: Waiting for purge to start
2014-09-18 22:37:07 2698 [Note] InnoDB: 5.6.20 started; log sequence number 1625977
2014-09-18 22:37:08 2698 [Note] Binlog end
2014-09-18 22:37:08 2698 [Note] InnoDB: FTS optimize thread exiting.
2014-09-18 22:37:08 2698 [Note] InnoDB: Starting shutdown...
2014-09-18 22:37:09 2698 [Note] InnoDB: Shutdown completed; log sequence number 1625987
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.
Also, the account for the anonymous user has been removed.
In addition, you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test database.
This is strongly recommended for production servers.
See the manual for more instructions.
Please report any problems at http://bugs.mysql.com/
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
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
[root@target_pc software]# rpm -ivh MySQL-client-5.6.20-1.linux_glibc2.5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
--通过这种形式安装,mysql用户和用户组会自动建立,并且是mysql安装路径的所属用户和用户组。
四:改root密码
[root@target_pc software]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &[1] 3119
[root@target_pc software]# 140918 23:02:23 mysqld_safe Logging to '/var/lib/mysql/target_pc.err'.
140918 23:02:23 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
--它会停留在这个界面一段时间,感觉需要一直等待一样,此时,直接回车就行了。
[root@target_pc software]# mysql -u root -p
Enter password:
--这里不用输入密码,直接回车就行了。
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.20 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, 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> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set password=password('beijing') where user='root';
Query OK, 4 rows affected (0.01 sec)
Rows matched: 4 Changed: 4 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
五:启动mysql服务
[root@target_pc software]# service mysql startStarting MySQL. [ OK ]
六:登陆,测试是否安装成功
[root@target_pc software]# mysql -u root -pEnter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.20
Copyright (c) 2000, 2014, 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> show databases;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> set password=password('beijing');
Query OK, 0 rows affected (0.00 sec)
--再设置一次密码
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
--不会再报错了。
相关文章推荐
- vmware ubuntu linux tomcat Xshell Xftp 搭建网站后台——(六)mysql下载安装配置及编码设置
- Linux\CentOS系统下的服务器搭建,下载编译环境,安装vsFtpd、nginx、MySQL、JDK、Tomcat、PHP
- Linux下编写运行访问MYSQL的程序以及MYSQL在linux下的下载安装
- linux下mysql下载与安装
- Linux下 快速安装mysql数据库(附mysql下载路径)
- Linux下的mysql下载及安装
- 学习笔记,Linux常用命令--MySQL下载安装配置
- Mysql在linux下载、安装详情,附带mysql安装包路径
- Linux\CentOS系统下的服务器搭建,下载编译环境,安装vsFtpd、nginx、MySQL、JDK、Tomcat、PHP
- linux系统Mysql5.6下载与安装
- 详解Linux环境下Mysql的安装(含下载地址)
- Linux下的mysql下载及安装
- Linux平台用下载rpm包安装MySQL和使用过程
- 08 Linux下MySQL的下载、安装及启动
- linux系统安装mysql5.7(二) --linux安装mysql遇到的问题 和libaio-dev文件 mysql下载网址
- Linux(ubuntu)下tomcat的下载安装以及mysql的下载和安装
- Linux + JDK + Tomcat + MySQL + JDBC 安装手记
- 在linux下安装mysql
- 在Linux下安装和使用MySQL
- Red Hat Linux基本知识(网络配置,安装appache,mysql,php,zend,jdk,tomcat)