[root@Linux opt]# tar -xvf MySQL-5.6.16-1.rhel5.x86_64.rpm-bundle.tar
MySQL-shared-compat-5.6.16-1.rhel5.x86_64.rpm
MySQL-test-5.6.16-1.rhel5.x86_64.rpm
MySQL-client-5.6.16-1.rhel5.x86_64.rpm
MySQL-embedded-5.6.16-1.rhel5.x86_64.rpm
MySQL-devel-5.6.16-1.rhel5.x86_64.rpm
MySQL-server-5.6.16-1.rhel5.x86_64.rpm
MySQL-shared-5.6.16-1.rhel5.x86_64.rpm

[root@Linux opt]# rpm -ivh MySQL-shared-compat-5.6.16-1.rhel5.x86_64.rpm

Preparing...                ########################################### [100%]
   1:MySQL-shared-compat    ########################################### [100%]

[root@Linux opt]# rpm -ivh MySQL-server-5.6.16-1.rhel5.x86_64.rpm Preparing...                ########################################### [100%]    1:MySQL-server           ########################################### [100%]

2014-03-05 14:23:20 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2014-03-05 14:23:20 19310 [Note] InnoDB: Using atomics to ref count buffer pool pages

2014-03-05 14:23:20 19310 [Note] InnoDB: The InnoDB memory heap is disabled

2014-03-05 14:23:20 19310 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2014-03-05 14:23:20 19310 [Note] InnoDB: Compressed tables use zlib 1.2.3

2014-03-05 14:23:20 19310 [Note] InnoDB: Using Linux native AIO

2014-03-05 14:23:20 19310 [Note] InnoDB: Using CPU crc32 instructions

2014-03-05 14:23:20 19310 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2014-03-05 14:23:20 19310 [Note] InnoDB: Completed initialization of buffer pool

2014-03-05 14:23:20 19310 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!

2014-03-05 14:23:20 19310 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB

2014-03-05 14:23:20 19310 [Note] InnoDB: Database physically writes the file full: wait...

2014-03-05 14:23:22 19310 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB

2014-03-05 14:23:25 19310 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB

2014-03-05 14:23:29 19310 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0

2014-03-05 14:23:29 19310 [Warning] InnoDB: New log files created, LSN=45781

2014-03-05 14:23:29 19310 [Note] InnoDB: Doublewrite buffer not found: creating new

2014-03-05 14:23:29 19310 [Note] InnoDB: Doublewrite buffer created

2014-03-05 14:23:29 19310 [Note] InnoDB: 128 rollback segment(s) are active.

2014-03-05 14:23:29 19310 [Warning] InnoDB: Creating foreign key constraint system tables.

2014-03-05 14:23:30 19310 [Note] InnoDB: Foreign key constraint system tables created

2014-03-05 14:23:30 19310 [Note] InnoDB: Creating tablespace and datafile system tables.

2014-03-05 14:23:30 19310 [Note] InnoDB: Tablespace and datafile system tables created.

2014-03-05 14:23:30 19310 [Note] InnoDB: Waiting for purge to start

2014-03-05 14:23:30 19310 [Note] InnoDB: 5.6.16 started; log sequence number 0 A random root password has been set. You will find it in '/root/.mysql_secret'.

2014-03-05 14:23:34 19310 [Note] Binlog end

2014-03-05 14:23:34 19310 [Note] InnoDB: FTS optimize thread exiting.

2014-03-05 14:23:34 19310 [Note] InnoDB: Starting shutdown...

2014-03-05 14:23:36 19310 [Note] InnoDB: Shutdown completed; log sequence number 1625977

2014-03-05 14:23:36 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2014-03-05 14:23:36 19335 [Note] InnoDB: Using atomics to ref count buffer pool pages

2014-03-05 14:23:36 19335 [Note] InnoDB: The InnoDB memory heap is disabled

2014-03-05 14:23:36 19335 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2014-03-05 14:23:36 19335 [Note] InnoDB: Compressed tables use zlib 1.2.3

2014-03-05 14:23:36 19335 [Note] InnoDB: Using Linux native AIO

2014-03-05 14:23:36 19335 [Note] InnoDB: Using CPU crc32 instructions

2014-03-05 14:23:36 19335 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2014-03-05 14:23:36 19335 [Note] InnoDB: Completed initialization of buffer pool

2014-03-05 14:23:36 19335 [Note] InnoDB: Highest supported file format is Barracuda.

2014-03-05 14:23:36 19335 [Note] InnoDB: 128 rollback segment(s) are active.

2014-03-05 14:23:36 19335 [Note] InnoDB: Waiting for purge to start

2014-03-05 14:23:36 19335 [Note] InnoDB: 5.6.16 started; log sequence number 1625977

2014-03-05 14:23:36 19335 [Note] Binlog end

2014-03-05 14:23:36 19335 [Note] InnoDB: FTS optimize thread exiting.

2014-03-05 14:23:36 19335 [Note] InnoDB: Starting shutdown...

2014-03-05 14:23:38 19335 [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@Linux opt]#

安装成功后,默认端口号时3306.

[root@Linux ~]# lsof -i:3306
COMMAND   PID  USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
mysqld  22780 mysql   10u  IPv4 1641477      0t0  TCP *:mysql (LISTEN)
[root@Linux ~]# cd /var/lib/mysql      数据库目录
[root@Linux mysql]# ls
auto.cnf     ib_logfile1  mysql               RPM_UPGRADE_HISTORY
ibdata1      Linux.err    mysql.sock          RPM_UPGRADE_MARKER-LAST
ib_logfile0  Linux.pid    performance_schema  test

[root@Linux mysql]# cd /usr/share/mysql     配置文件

[root@Linux mysql]# ls
binary-configure      hungarian                     norwegian
bulgarian             innodb_memcached_config.sql   norwegian-ny
charsets              italian                       polish
czech                 japanese                      portuguese
danish                korean                        romanian
dictionary.txt        magic                         russian
dutch                 my-default.cnf                SELinux
english               mysqld_multi.server           serbian
errmsg-utf8.txt       mysql-log-rotate              slovak
estonian              mysql_security_commands.sql   solaris
fill_help_tables.sql  mysql.server                  spanish
french                mysql_system_tables_data.sql  swedish
german                mysql_system_tables.sql       ukrainian
greek                 mysql_test_data_timezone.sql

3、相关命令
     /usr/bin(mysqladmin   mysqldump等命令)
 
     4、启动脚本
     /etc/rc.d/init.d/(启动脚本文件mysql的目录)

如:/etc/rc.d/init.d/mysql   start/restart/stop/status

由于MySQL数据库目录占用磁盘比较大,所以我在/根目录下建了个个目录data,命令如下:

[root@Linux bin]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             50786236   2478688  45686144   6% /
/dev/sda3            306748620   5803348 285112012   2% /usr
tmpfs                  1763232         0   1763232   0% /dev/shm
[root@Linux bin]# cd /usr
[root@Linux usr]# ls
bin  games    java      lib    libexec  lost+found  sbin   src  workfiles
etc  include  kerberos  lib64  local    my.cnf      share  tmp  X11R6
[root@Linux usr]# mkdir data

)把数据库移动到data目录中去。输入以下命令:

# mv  /var/lib/mysql  /usr/data

最后,进入data目录就会看到有一个mysql文件夹。

[root@Linux mysql]# cd /etc/rc.d/init.d

[root@Linux init.d]# vi mysql

basedir=
datadir=/usr/data/mysql   保存即可。

[root@Linux usr]# mysql -u root -p -S /usr/data/mysql/mysql.sock
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/data/mysql/mysql.sock' (111)
[root@Linux usr]# ps -A |grep mysql
22677 pts/4    00:00:00 mysqld_safe
22780 pts/4    00:00:00 mysqld
[root@Linux usr]# kill -9 22677
[root@Linux usr]# kill -9 22780
[root@Linux usr]# service mysql start
Starting MySQL                                             [  OK  ]
[root@Linux usr]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

于是重改密码!

# /etc/init.d/mysql stop

# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

# mysql -u root mysql

mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';

mysql> FLUSH PRIVILEGES;

mysql> quit

# /etc/init.d/mysqld restart

# mysql -u root -p

Enter password:

mysql>

卸载Mysql

1、查找以前是否装有mysql

命令:rpm -qa|grep -i mysql

可以看到mysql的两个包:

mysql-4.1.12-3.RHEL4.1

mysqlclient10-3.23.58-4.RHEL4.1

2、删除mysql

删除命令:rpm -e --nodeps 包名

( rpm -ev mysql-4.1.12-3.RHEL4.1 )

3、删除老版本mysql的开发头文件和库

命令:rm -fr /usr/lib/mysql

rm -fr /usr/include/mysql

注意:卸载后/var/lib/mysql中的数据及/etc/my.cnf不会删除,如果确定没用后就手工删除

rm -f /etc/my.cnf

  rm -fr /var/lib/mysql

安装mysql ,从 mysql-5.5.5 开始innodb作为默认的存储引擎了的更多相关文章

  1. MySQL中MyISAM和InnoDB两种主流存储引擎的特点

    一.数据库引擎(Engines)的概念 MySQ5.6L的架构图: MySQL的存储引擎全称为(Pluggable Storage Engines)插件式存储引擎.MySQL的所有逻辑概念,包括SQL ...

  2. MySQL性能调优与架构设计——第11章 常用存储引擎优化

    第11章 常用存储引擎优化 前言: MySQL 提供的非常丰富的存储引擎种类供大家选择,有多种选择固然是好事,但是需要我们理解掌握的知识也会增加很多.每一种存储引擎都有各自的特长,也都存在一定的短处. ...

  3. 修改MySQL的默认数据存储引擎

    因为MySQL默认的是MyISAM数据引擎,不支持事务也不支持外键,所以需要用到Innodb引擎,于是决定将mysql的默认引擎设置为innodb.1 . 查看MySQL存储引擎是用的哪个?登录MyS ...

  4. MySQL删除相同前缀的表,修改某个库的存储引擎

    MySQL5.0 之后,提供了一个新的数据库information_schema,用来记录MySQL总的元数据信息.元数据指的是 数据的数据. 比如表名.列名.列类型.索引名等表的各种属性名称.这个库 ...

  5. MySQL数据库_索引_事务_优化 _锁_存储引擎_存储过程_CAP

    ##一.基础 ## *    插入                   INSERT INTO table_name ( field1, field2,...fieldN )              ...

  6. mysql默认的存储引擎是什么?它们的区别有哪些?mysql中索引有哪些?

    1.mysql默认引擎 mysql-5.1版本之前默认引擎是MyISAM,之后是innoDB 2.关系 MyISAM是非集聚引擎,支持全文索引;不支持事务;它是表级锁;会保存表的具体行数. innoD ...

  7. [MySQL Reference Manual]14 InnoDB存储引擎

    14 InnoDB存储引擎 14 InnoDB存储引擎 14.1 InnoDB说明 14.1.1 InnoDB作为默认存储引擎 14.1.1.1 存储引擎的趋势 14.1.1.2 InnoDB变成默认 ...

  8. 【转】MySQL 数据库存储引擎

    原文地址:http://blog.jobbole.com/94385/ 简单介绍 存储引擎就是指表的类型.数据库的存储引擎决定了表在计算机中的存储方式.存储引擎的概念是MySQl的特点,而且是一个插入 ...

  9. MySQL 数据库存储引擎

    简单介绍 存储引擎就是指表的类型.数据库的存储引擎决定了表在计算机中的存储方式.存储引擎的概念是MySQl的特点,而且是一个插入式的存储引擎概念.这就决定了MySQl数据库中的表可以使用不同的存储方式 ...

随机推荐

  1. Linux添加软件连接方法

    这是linux中一个非常重要命令,请大家一定要熟悉.它的功能是为某一个文件或目录在另外一个位置建立一个同步的链接,类似Windows下的超级链接. 这个命令最常用的参数是-s,具体用法是:sudo l ...

  2. 第二次冲刺spring会议(第二次会议)

    [例会时间]2014/5/5 21:15 [例会地点]9#446 [例会形式]轮流发言 [例会主持]马翔 [例会记录]兰梦 小组成员:兰梦 ,马翔,李金吉,赵天,胡佳奇 界面的一些修改如下

  3. 6.编写一个Java应用程序,该应用程序包括2个类:Print类和主类E。Print 类里有一个方法output()功能是输出100 ~ 999之间的所有水仙花数(各位数字的 立方和等于这个三位数本身,如: 371 = 33 + 73 + 13。)在主类E的main方法中来 测试类Print。

    Print类: package com.bao; public class Print { int g,s,b; void outPut() { for(int i=100;i<1000;i++ ...

  4. android打包大小笔录

    版本 4.6.1 1-1  游戏完整包的大小 1-2 1级代码压缩 1-3 2级代码压缩 1-4 3级代码压缩 2-1 删除核心战斗的部分资源 2-2 2级代码压缩 3-0 删除外部UI的资源  剩下 ...

  5. Tomcat7调优及JVM性能优化for Linux环境

    标签: tomcat7 jvm 性能 分享到: 出处:http://www.iteye.com 该优化针对Linux X86_X64环境 1. Tomcat优化其实就是对server.xml优化(开户 ...

  6. 请教下关于CKEditor富文本编辑框设置字体颜色的问题

    CKEDITOR.editorConfig = function( config ){ config.plugins = 'about,a11yhelp,basicstyles,bidi,blockq ...

  7. drupal7 开发block

    在自己开发的模块的module文件中,实现两个钩子:hook_block_info()和hook_block_view() function journal_block_info() { $block ...

  8. wpf之DataTrigger 数据触发器

    wpf中,根据数据的值的不同,UI的界面随之改变(显示控件.隐藏控件以及改变控件的其它属性), 这时我们可以用DataTrigger数据触发器. 下面两个案例实现同样的功能,当条件(数据的值)不同时, ...

  9. captche验证码

    JCaptcha 是一个用来生成验证码的开源Java类库 CaptchaServiceSingleton类(单态类) package com.dongbin.testy; import com.oct ...

  10. Eclipse/MyEclipse中常用快捷键总结

    1.格式化代码: Ctrl+Shift+F; 2.自动生成get/set方法:Shifi+Alt+S+R(按下空格是选中). 3.自动生成toString方法:Shifi+Alt+S+S(按下空格是选 ...