Mysql misc 1

Source: Internet
Author: User

[Compile]

Innodb is compiled as a plug-in by default in the form of Dynamic Links (*. so). You can./configure -- help | less to view details.

After installation, it will be placed in./lib/mysql/plugin. The parameters will be loaded later: -- plugin-load = innodb = ha_innodb_plugin.so

 

The following is not required (or other system users can run mysql ):

Prepare a mysql user before installation:

# Groupadd mysql

# Useradd-g mysql


# Make install

Then, change all files in the installation directory to all files in mysql.

Chgrp-R mysql "mysql_install_dir"

Chown-R mysql "mysql_install_dir"

 

--

 

"Source_dir"/scripts/mysql_install_db is used to create mysql Data Directories and run some SQL files through mysqld to create databases and tables.

# Sh mysql_install_db -- basedir = "dir-to-find-mysqld" -- datadir = "dir-to-install-databasefile"

When no parameter exists

# Sh mysql_install_db

The default path parameters are generated by./configure, for example:

 

Ldata = "/home/zjay/bin/mysql5.1/var"

Basedir = "/home/zjay/bin/mysql5.1"

Bindir = "/home/zjay/bin/mysql5.1/bin"

Extra_bindir = "$ bindir"

Mysqld = "/home/zjay/bin/mysql5.1/libexec/mysqld"

Pkgdatadir = "/home/zjay/bin/mysql5.1/share/MySQL"

Scriptdir = "/home/zjay/bin/mysql5.1/bin"

 

 

--

 

 

# Mysqld -- verbose -- help | less

You can see the basic help of mysqld (nearly 1000 rows..., all the parameter descriptions are here)

The reading sequence of all configuration files is also displayed.

 

--

 

[INNODB]

Http://dev.mysql.com/doc/refman/5.1/en/innodb-storage-engine.html

 

Load:

Install plugin InnoDB soname 'Ha _ innodb_plugin.so ';

The method writes a record in the mysql. plugin table so that the plug-in can be loaded again at the next MySQL startup.

Use the -- Plugin-load write rule to load data when MySQL is started.

Parameter: http://dev.mysql.com/doc/refman/5.1/en/replacing-builtin-innodb.html

 

Tablespace (the file that stores the table ):

-- The innodb_file_per_table parameter enables the newly created INNODB table to use an independent "table_name ". frm, "table_name ". ibd appears, and both indexes and data exist. ibd files, but table definitions, transaction IDs, and LOG IDs are all stored in the shared tablespace. Therefore, these independent table data files cannot be moved as they are in MYISAM tables.

 

 

 

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.