免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1362 | 回复: 1

mysql裸存储问题 [复制链接]

论坛徽章:
0
发表于 2016-09-21 12:06 |显示全部楼层
新手刚接触mysql,安装遇到个问题:环境:虚拟机centos6.5 , mysql-server-5.1,裸存储即1G虚拟磁盘一块。


1、yum install mysql-server 正常

2、raw /dev/raw/raw1 /dev/sdb1 (sdb1是未格式化的分区)

    chown mysql.mysql /dev/raw/raw1
    chmod 660 /dev/raw/raw1

3、/etc/my.cnf
    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    innodb_data_home_dir=
    innodb_data_file_path=/dev/raw/raw2:500Mraw
    innodb_file_per_table=0
    innodb_log_group_home_dir=/var/lib/mysql/iblogs

4、mkdir -pv /var/lib/mysql/iblogs
    chown mysql.mysql /var/lib/mysql/iblogs

5、service mysqld start [ok]
     查看日志(/var/log/mysqd.log)

160921 11:56:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160921 11:56:48  InnoDB: Initializing buffer pool, size = 8.0M
160921 11:56:48  InnoDB: Completed initialization of buffer pool
160921 11:56:48  InnoDB: Log file /var/lib/mysql/iblogs/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /var/lib/mysql/iblogs/ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
160921 11:56:48  InnoDB: Log file /var/lib/mysql/iblogs/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /var/lib/mysql/iblogs/ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...

InnoDB: Cannot initialize created log files because
InnoDB: data files are corrupt, or new data files were
InnoDB: created when the database was started previous
InnoDB: time but the database was not shut down
InnoDB: normally after that.
160921 11:56:48 [ERROR] Plugin 'InnoDB' init function returned error.
160921 11:56:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160921 11:56:48 [Note] Event Scheduler: Loaded 0 events
160921 11:56:48 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.71'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

innodb初始化失败。
因为是新手,可能理解不到位,对于错误,请大家指教一下,谢谢!

论坛徽章:
7
15-16赛季CBA联赛之佛山
日期:2016-03-30 16:38:31数据库技术版块每日发帖之星
日期:2016-04-09 06:20:00操作系统版块每日发帖之星
日期:2016-06-11 06:20:0015-16赛季CBA联赛之北控
日期:2016-06-23 16:03:35C
日期:2016-10-25 16:19:21PHP
日期:2016-10-25 16:19:2115-16赛季CBA联赛之天津
日期:2017-01-07 13:22:29
发表于 2016-09-21 17:32 |显示全部楼层
/var/lib/mysql/mysql.sock
查看目录 查看权限 推荐/tmp/mysql.sock
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP