Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the failure of using innodb to create data file in mysql

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces how to solve the failure of using innodb to create data files in mysql. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

The solution to the failure of creating data File by innodb

/ etc/my.cnf configuration

Www.2cto.com

[mysqld]

Datadir=/var/lib/mysql

Socket=/var/lib/mysql/mysql.sock

User=mysql

# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

Old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks

# to do so, uncomment this line:

# symbolic-links=0

Default-character-set=utf8

Default-storage-engine=innodb

# Uncomment the following if you are using InnoDB tables

Innodb_data_home_dir = / var/mysql/innodb/

Innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend

Innodb_log_group_home_dir = / var/mysql/innodb/log/

Innodb_log_arch_dir = / var/mysql/innodb/log/

Www.2cto.com

# You can set.. _ buffer_pool_size up to 50-80%

# of RAM but beware of setting memory usage too high

Innodb_buffer_pool_size = 1024m

Innodb_additional_mem_pool_size = 20m

# Set.. _ log_file_size to 25% of buffer pool size

Innodb_log_file_size = 192 M

Innodb_log_buffer_size = 18m

Innodb_flush_log_at_trx_commit = 1

Innodb_lock_wait_timeout = 50

[client]

Default-character-set=gbk

[mysqld_safe]

Log-error=/var/log/mysqld.log

Pid-file=/var/run/mysqld/mysqld.pid

Failed to start mysqld with directory permissions set to 777 and / usr/bin/mysql_install_db-- user=mysql

The reason seems to be that the data directory of innodb must be in a subdirectory of the datadir configuration!

View log / var/log/mysqld.log

.

120817 13:08:17 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.

InnoDB: File name / var/mysql/innodb/ibdata1

InnoDB: File operation call: 'create'.

InnoDB: Cannot continue operation.

120817 13:08:17 mysqld ended

Modify / etc/my.cnf configuration

Www.2cto.com

[mysqld]

Datadir=/var/lib/mysql

Socket=/var/lib/mysql/mysql.sock

User=mysql

# Default to using old password format for compatibility with mysql 3.x

# clients (those using the mysqlclient10 compatibility package).

Old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks

# to do so, uncomment this line:

# symbolic-links=0

Default-character-set=utf8

Default-storage-engine=innodb

# Uncomment the following if you are using InnoDB tables

Innodb_data_home_dir=/var/lib/mysql/innodb/

Innodb_data_file_path=ibdata1:2000M;ibdata2:10M:autoextend

Innodb_log_group_home_dir=/var/lib/mysql/innodb/log/

Innodb_log_arch_dir=/var/lib/mysql/innodb/log/

# You can set.. _ buffer_pool_size up to 50-80%

# of RAM but beware of setting memory usage too high

Innodb_buffer_pool_size=1024M

Innodb_additional_mem_pool_size=20M

# Set.. _ log_file_size to 25% of buffer pool size

Innodb_log_file_size=192M

Innodb_log_buffer_size=18M

Innodb_flush_log_at_trx_commit=1

Innodb_lock_wait_timeout=50

Www.2cto.com

[client]

Default-character-set=gbk

[mysqld_safe]

Log-error=/var/log/mysqld.log

Pid-file=/var/run/mysqld/mysqld.pid

On mysql using innodb to create data files how to solve the failure to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report