Solution to the location of MySQL Data File Transfer in Linux

Source: Internet
Author: User

After a whole day, I got more information by referring to n. Finally, I got it !!!!!!!

To separate MySQL installation programs from data files in Linux, the first problem is the configuration during installation,

. /Configure -- prefix =/program/mysql -- with-unix-sock-path =/tmp/mysql. sock -- localstatedir =/server/mysql/data -- with-charset = gbk -- with-extra-charsets = all

Localstatedir is the data file installation location.

Next, the mysql user needs the corresponding folder to have operation permissions.

Chown-R mysql: mysql/program/mysql

Chown-R mysql: mysql/server/mysql

Again, you must specify the file location during data initialization.

/Program/mysql/bin/mysql_install_db -- basedir =/program/mysql -- datadir =/server/mysql/data -- user = nobody

The three key steps are solved!

Author: Cheng Gang @ Cheng Gang wangzhi & Tianyu star
Address: http://www.chenggang.net/post/43/
You are welcome to repost, subscribe, and add to favorites. Please note the author, original source, and this statement in the form of links during reprinting!

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.