安装MYSQL5.6.10启动不了,出错。。。

丰圣谋 发布于 2013/04/18 21:55
阅读 14K+
收藏 0

版本mysql.5.6.10安装问题

/usr/local/mysql/bin$ sudo mysqld_safe --basedir=/usr/local/mysql --datadir=/window/d/software/mysql/data --user=mysql &

启动不了

130418 21:49:20 mysqld_safe Starting mysqld daemon with databases from /window/d/software/mysql/data
2013-04-18 21:49:20 7088 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
2013-04-18 21:49:20 7088 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Unknown error 1017
2013-04-18 21:49:20 7088 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2013-04-18 21:49:20 7088 [Note] InnoDB: The InnoDB memory heap is disabled
2013-04-18 21:49:20 7088 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-04-18 21:49:20 7088 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-04-18 21:49:20 7088 [Note] InnoDB: CPU does not support crc32 instructions
2013-04-18 21:49:20 7088 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-04-18 21:49:20 7088 [Note] InnoDB: Completed initialization of buffer pool
2013-04-18 21:49:20 b73d3980  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
2013-04-18 21:49:20 b73d3980  InnoDB: File name ./ibdata1
2013-04-18 21:49:20 b73d3980  InnoDB: File operation call: 'stat' returned OS error 113.
2013-04-18 21:49:20 7088 [ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
2013-04-18 21:49:20 7088 [ERROR] InnoDB: The system tablespace must be writable!
2013-04-18 21:49:20 7088 [ERROR] Plugin 'InnoDB' init function returned error.
2013-04-18 21:49:20 7088 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2013-04-18 21:49:20 7088 [ERROR] Aborting

2013-04-18 21:49:20 7088 [Note] Binlog end
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'partition'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_FT_INSERTED'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_METRICS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_CMPMEM'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_CMP'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_LOCKS'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'INNODB_TRX'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'BLACKHOLE'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'ARCHIVE'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'MRG_MYISAM'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'MyISAM'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'MEMORY'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'CSV'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'sha256_password'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'mysql_old_password'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'mysql_native_password'
2013-04-18 21:49:20 7088 [Note] Shutting down plugin 'binlog'
2013-04-18 21:49:20 7088 [Note]
130418 21:49:20 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

加载中
0
逝水fox
逝水fox
检查你的安装目录下data这个子目录的所有者是不是mysql这个用户
0
八宝旗
八宝旗
看起来是权限问题
0
0-1
0-1

可能是安装不完整或启动路径不对:

1. datadir=/window/d/software/mysql/data 先改为 datadir=/usr/local/mysql/data 试试

2. 启动方式改service mysqld start试试

3. my.cnf先改default-storage-engine=MyISAM试试

不熟悉的初次安装,最好还是先按默认值来启动,等成功后再去尝试自定义配置项。

步子迈太大,容易扯着蛋。哈哈。

0
丰圣谋
丰圣谋

谢谢大家,可能是data权限吧

补充一下我的安装方式:

mysql5.6.10不支持configure安装了,提供了CMAKE安装方式
#sudo groupadd mysql
#sudo useradd mysql -g mysql
#sudo mkdir -p /window/d/software/mysql/data
#sudo mkdir /usr/local/mysql
#sudo mkdir /var/log/mysql
#sudo chown -R mysql:mysql  /window/d/software/mysql/data
#sudo chown -R mysql:mysql /usr/local/mysql
#sudo chown -R mysql:mysql  /var/log/mysql
#vi /etc/profile
Append these 2 lines to the end of the file:
PATH=/usr/local/mysql/bin:/usr/local/mysql/lib:$PATH
export PATH
#sudo apt-get install g++
#sudo apt-get install libncurses5-dev
#sudo rm -rf CMakeCache.txt
#sudo apt-get install cmake
#sudo cmake -DCMAKE_STALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8  -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock  -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1  -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/window/d/software/mysql/data -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306 -DSYSCONFDIR=/etc -DEXTRA_CHARSETS=all
#make && make install
#
cd /usr/local/mysql
#sudo vim.tiny /etc/mysql/my.cnf添加
explicit_defaults_for_timestamp=true
#sudo mysqld_safe --basedir=/usr/local/mysql --datadir=/window/d/software/mysql/data --user=mysql &


我是把数据库data目录指定挂载的NTFS分区下/window/d/software/mysql/data 

然后

#sudo chom -R 777 /window/d/software/mysql/data 

#sudo chown -R mysql:mysql /window/d/software/mysql/data 

发现在允许访问的目录用户并没有改过了,还是挂载时的用户组。请问是不是不能安装到NTFS分区呢

返回顶部
顶部