二:修改my.cnf文件,在[MySQLd]中添加如下两项!关于数据库的存储是否需要使用裸设备应当在数据库创建前规划好
- [root@ www.linuxidc.com ~]# grep 'innodb_data' /etc/my.cnf
- innodb_data_home_dir =
- innodb_data_file_path = /dev/raw/raw6:1Gnewraw
三:初始化mysql数据库,启动mysql服务,在日志中可以看到格式化过程,在未将前面两项配置中的newraw改为raw之前,无法创建innodb类型的表
- [root@ www.linuxidc.com mysql-5.5.25]# sh ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql5.5.25/ --datadir=/mydata/
- [root@ www.linuxidc.com mysql-5.5.25]# service mysqld start
- Starting MySQL....................[ OK ]
- [root@ www.linuxidc.com ~]# tail -f /mydata/dg53.yang.com.err
- 110601 9:55:51 InnoDB: The InnoDB memory heap is disabled
- 110601 9:55:51 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
- 110601 9:55:51 InnoDB: Compressed tables use zlib 1.2.3
- 110601 9:55:51 InnoDB: Initializing buffer pool, size = 128.0M
- 110601 9:55:51 InnoDB: Completed initialization of buffer pool
- InnoDB: The first specified data file /dev/raw/raw6 did not exist:
- InnoDB: a new database to be created!
- 110601 9:55:51 InnoDB: Setting file /dev/raw/raw6 size to 1024 MB
- InnoDB: Database physically writes the file full: wait...
- InnoDB: Progress in MB: 100 200 300 400 500 600 700 800 900 1000
- 110601 9:56:09 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
- InnoDB: Setting log file ./ib_logfile0 size to 5 MB
- InnoDB: Database physically writes the file full: wait...
- 110601 9:56:09 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
- InnoDB: Setting log file ./ib_logfile1 size to 5 MB
- InnoDB: Database physically writes the file full: wait...
- InnoDB: Doublewrite buffer not found: creating new
- InnoDB: Doublewrite buffer created
- InnoDB: 127 rollback segment(s) active.
- InnoDB: Creating foreign key constraint system tables
- InnoDB: Foreign key constraint system tables created
- 110601 9:56:10 InnoDB: Waiting for the background threads to start
- 110601 9:56:11 InnoDB: 1.1.8 started; log sequence number 0
- 110601 9:56:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
- 110601 9:56:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
- 110601 9:56:11 [Note] Server socket created on IP: '0.0.0.0'.
- 110601 9:56:11 [Note] Event Scheduler: Loaded 0 events
- 110601 9:56:11 [Note] /usr/local/mysql5.5.25/bin/mysqld: ready for connections.
- Version: '5.5.25-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
- InnoDB: A new raw disk partition was initialized:
- InnoDB: we do not allow database modifications by the user.
- InnoDB: Shut down mysqld and edit my.cnf so that newraw is replaced with raw.
- mysql> create database bbs;
- Query OK, 1 row affected (0.00 sec)
- mysql> use bbs;
- Database changed
- mysql> create table user as select * from mysql.user;
- ERROR 1005 (HY000): Can't create table 'bbs.user' (errno: -1)
