手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

MySQL 5.5使用裸设备存储

[日期:2012-06-02] 来源:51cto  作者:斩月 [字体:大 中 小]

二:修改my.cnf文件,在[MySQLd]中添加如下两项!关于数据库的存储是否需要使用裸设备应当在数据库创建前规划好

  1. [root@ www.linuxidc.com ~]# grep 'innodb_data' /etc/my.cnf   
  2. innodb_data_home_dir =  
  3. innodb_data_file_path = /dev/raw/raw6:1Gnewraw 

三:初始化mysql数据库,启动mysql服务,在日志中可以看到格式化过程,在未将前面两项配置中的newraw改为raw之前,无法创建innodb类型的表

  1. [root@ www.linuxidc.com mysql-5.5.25]# sh ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql5.5.25/ --datadir=/mydata/  
  2.  
  3. [root@ www.linuxidc.com mysql-5.5.25]# service mysqld start  
  4. Starting MySQL....................[  OK  ]  
  5.  
  6. [root@ www.linuxidc.com ~]# tail -f /mydata/dg53.yang.com.err  
  7. 110601  9:55:51 InnoDB: The InnoDB memory heap is disabled  
  8. 110601  9:55:51 InnoDB: Mutexes and rw_locks use InnoDB's own implementation  
  9. 110601  9:55:51 InnoDB: Compressed tables use zlib 1.2.3  
  10. 110601  9:55:51 InnoDB: Initializing buffer pool, size = 128.0M  
  11. 110601  9:55:51 InnoDB: Completed initialization of buffer pool  
  12. InnoDB: The first specified data file /dev/raw/raw6 did not exist:  
  13. InnoDB: a new database to be created!  
  14. 110601  9:55:51  InnoDB: Setting file /dev/raw/raw6 size to 1024 MB  
  15. InnoDB: Database physically writes the file full: wait...  
  16. InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000  
  17. 110601  9:56:09  InnoDB: Log file ./ib_logfile0 did not exist: new to be created  
  18. InnoDB: Setting log file ./ib_logfile0 size to 5 MB  
  19. InnoDB: Database physically writes the file full: wait...  
  20. 110601  9:56:09  InnoDB: Log file ./ib_logfile1 did not exist: new to be created  
  21. InnoDB: Setting log file ./ib_logfile1 size to 5 MB  
  22. InnoDB: Database physically writes the file full: wait...  
  23. InnoDB: Doublewrite buffer not found: creating new  
  24. InnoDB: Doublewrite buffer created  
  25. InnoDB: 127 rollback segment(s) active.  
  26. InnoDB: Creating foreign key constraint system tables  
  27. InnoDB: Foreign key constraint system tables created  
  28. 110601  9:56:10  InnoDB: Waiting for the background threads to start  
  29. 110601  9:56:11 InnoDB: 1.1.8 started; log sequence number 0  
  30. 110601  9:56:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306  
  31. 110601  9:56:11 [Note]   - '0.0.0.0' resolves to '0.0.0.0';  
  32. 110601  9:56:11 [Note] Server socket created on IP: '0.0.0.0'.  
  33. 110601  9:56:11 [Note] Event Scheduler: Loaded 0 events  
  34. 110601  9:56:11 [Note] /usr/local/mysql5.5.25/bin/mysqld: ready for connections.  
  35. Version: '5.5.25-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution  
  36. InnoDB: A new raw disk partition was initialized:  
  37. InnoDB: we do not allow database modifications by the user.  
  38. InnoDB: Shut down mysqld and edit my.cnf so that newraw is replaced with raw.  
  39.  
  40. mysql> create database bbs;  
  41. Query OK, 1 row affected (0.00 sec)  
  42.  
  43. mysql> use bbs;  
  44. Database changed  
  45. mysql> create table user as select * from mysql.user;  
  46. ERROR 1005 (HY000): Can't create table 'bbs.user' (errno: -1) 
linux
相关资讯       MySQL数据库教程 
本文评论   查看全部评论 (1)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 1 楼
* NANA 发表于 2012/8/10 10:18:07
广告中间插技术文档。。