mysql数据库安装过程中遇见的问题及解决办法
2015-10-30 14:26
585 查看
问题1:
Starting MySQL...Manager of pid-file quit without updating[failue]
解决办法:
修改启动脚本文件:/etc/init.d/mysqld
conf=/usr/local/mysql/etc/my.cnf
问题2:
[root@localhost scripts]# ./mysql_install_db --user=mysql --datadir=/database/mydata
FATAL ERROR: please install the following Perl modules before executing ./mysql_install_db:
Data::Dumper
解决办法:
[root@localhost scripts]# rpm -ivh /mnt/Packages/perl-Data-Dumper-2.145-3.el7.x86_64.rpm
warning: /mnt/Packages/perl-Data-Dumper-2.145-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:perl-Data-Dumper-2.145-3.el7 ################################# [100%]
问题3:
linux启动mysql报Fatal error:Can't change to run as user 'mysql' Please check that the user exists
解决办法:
1、创建mysql用户
useradd mysql
2、mysql目录改为mysql读写权限
chown -R mysql:mysql /var/lib/mysql
chown -R mysql:mysql /usr/local/mysql
问题4
[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/database/mydata
Installing MySQL system tables...2015-10-30 14:18:43 5981 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-30 14:18:43 5981 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-30 14:18:43 5981 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-30 14:18:43 5981 [Note] InnoDB: Memory barrier is not used
2015-10-30 14:18:43 5981 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-10-30 14:18:43 5981 [Note] InnoDB: Using CPU crc32 instructions
2015-10-30 14:18:43 5981 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-30 14:18:43 5981 [Note] InnoDB: Completed initialization of buffer pool
2015-10-30 14:18:43 5981 [Note] InnoDB: Restoring page 0 of tablespace 0
2015-10-30 14:18:43 5981 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
2015-10-30 14:18:43 5981 [ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1
2015-10-30 14:18:43 5981 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the
new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2015-10-30 14:18:43 5981 [ERROR] Plugin 'InnoDB' init function returned error.
2015-10-30 14:18:43 5981 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-10-30 14:18:43 5981 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-10-30 14:18:43 5981 [ERROR] Aborting
2015-10-30 14:18:43 5981 [Note] Binlog end
2015-10-30 14:18:43 5981 [Note] ./bin/mysqld: Shutdown complete
解决办法:
1.删除数据库目录下的文件ib_logfile0和ib_logfile1,我在安装时定义的数据库目录是/database/mydata
rm -rf /database/mydata/l
2.再次执行脚本
[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/database/mydata
Starting MySQL...Manager of pid-file quit without updating[failue]
解决办法:
修改启动脚本文件:/etc/init.d/mysqld
conf=/usr/local/mysql/etc/my.cnf
问题2:
[root@localhost scripts]# ./mysql_install_db --user=mysql --datadir=/database/mydata
FATAL ERROR: please install the following Perl modules before executing ./mysql_install_db:
Data::Dumper
解决办法:
[root@localhost scripts]# rpm -ivh /mnt/Packages/perl-Data-Dumper-2.145-3.el7.x86_64.rpm
warning: /mnt/Packages/perl-Data-Dumper-2.145-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:perl-Data-Dumper-2.145-3.el7 ################################# [100%]
问题3:
linux启动mysql报Fatal error:Can't change to run as user 'mysql' Please check that the user exists
解决办法:
1、创建mysql用户
useradd mysql
2、mysql目录改为mysql读写权限
chown -R mysql:mysql /var/lib/mysql
chown -R mysql:mysql /usr/local/mysql
问题4
[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/database/mydata
Installing MySQL system tables...2015-10-30 14:18:43 5981 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-10-30 14:18:43 5981 [Note] InnoDB: The InnoDB memory heap is disabled
2015-10-30 14:18:43 5981 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-10-30 14:18:43 5981 [Note] InnoDB: Memory barrier is not used
2015-10-30 14:18:43 5981 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-10-30 14:18:43 5981 [Note] InnoDB: Using CPU crc32 instructions
2015-10-30 14:18:43 5981 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-10-30 14:18:43 5981 [Note] InnoDB: Completed initialization of buffer pool
2015-10-30 14:18:43 5981 [Note] InnoDB: Restoring page 0 of tablespace 0
2015-10-30 14:18:43 5981 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
2015-10-30 14:18:43 5981 [ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1
2015-10-30 14:18:43 5981 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the
new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2015-10-30 14:18:43 5981 [ERROR] Plugin 'InnoDB' init function returned error.
2015-10-30 14:18:43 5981 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-10-30 14:18:43 5981 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-10-30 14:18:43 5981 [ERROR] Aborting
2015-10-30 14:18:43 5981 [Note] Binlog end
2015-10-30 14:18:43 5981 [Note] ./bin/mysqld: Shutdown complete
解决办法:
1.删除数据库目录下的文件ib_logfile0和ib_logfile1,我在安装时定义的数据库目录是/database/mydata
rm -rf /database/mydata/l
2.再次执行脚本
[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql --datadir=/database/mydata
相关文章推荐
- MySQL Proxy 安装与读写分离体验
- 利用mysql的amoeba实现主从和读写分离
- MYSQL开发性能研究——批量插入的优化措施
- MySQL用法
- mysql学习
- MySQL数据同步【双主热备】
- MySql系列之解决MySQL中varchar无法使用max()函数
- MySql系列之设置Mysql允许其他电脑访问
- mysql优化1--慢查询设置
- PowerDesigner系列之四:生成数据库时的列中文注释乱码问题[mysql]
- Powerdesigner系列之一:Mysql连接Powerdesigner
- MySQL系列之如何区分主表和子表
- MySQL系列之INFORMATION_SCHEMA.COLUMNS-表的字段信息
- mysql动态行转列
- 连接mysql error1130的解决方法
- mysql配置mysql-proxy读写分离
- mysql主从灾备
- 【CI PDO】CI框架下 Mysql PDO 使用方法小记
- 【CI PDO】CI框架下 Mysql PDO 使用方法小记
- 浅析MySQL中exists与in的使用