How to reconfigure MySQL Database Engine innodb in Linux

Source: Internet
Author: User

Sometimes, we need to reconfigure it because of our work needs.MySQLDatabase EngineInnodb. HowLinuxHow can I reconfigure the MySQL database engine innodb in the system? In this article, we will introduce this part of content. Let's take a look at it together!

1) Stop the mysql service.

[Root @ mysql ~] # Service mysqld stop.

2) modify the mysql configuration file.

[Root @ mysql ~] # Vi/etc/my. cnf.

3) delete files containing ib_logfile1 and ibdata in the datedir folder.

4) create a mysqldata folder in the root directory.

5) Enable the settings to take effect.

The content of my. cnf modification is as follows:

 
 
  1. [mysqld]  
  2. datadir=/var/lib/mysql  
  3. socket=/var/lib/mysql/mysql.sock  
  4. user=mysql 
  5. # Default to using old password format for compatibility with mysql 3.x  
  6. # clients (those using the mysqlclient10 compatibility package).  
  7. old_passwords=1 # Disabling symbolic-links is recommended to prevent assorted security risks;  
  8. # to do so, uncomment this line:  
  9. # symbolic-links=0 default-storage-engine=InnoDB 
  10. set-variable= transaction-isolation=READ-COMMITTED innodb_data_home_dir =  
  11. innodb_data_file_path =/mysqldata/ibdata1:2000M;/mysqldata/ibdata2:2000M:autoextend innodb_buffer_pool_size=1G 
  12. innodb_additional_mem_pool_size=20M 
  13. innodb_log_file_size=256M 
  14. innodb_log_buffer_size=8M 
  15. innodb_flush_log_at_trx_commit=1 
  16. innodb_lock_wait_timeout=50 
  17. innodb_thread_concurrency=5 [mysqld_safe]  
  18. log-error=/var/log/mysqld.log  
  19. pid-file=/var/run/mysqld/mysqld.pid 

The configuration method of MySQL Database Engine innodb in Linux is introduced here. If you want to learn more about MySQL database, you can read the article here: http://database.51cto.com/mysql/, and I believe you can bring it to you!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.