My. cnf already exists, affecting installation -- mysql, my. cnf -- mysql

Source: Internet
Author: User

My. cnf already exists, affecting installation -- mysql, my. cnf -- mysql

Found existing config file./my. cnf on the system.

Because this file might be in use, it was not replaced,

But was used in bootstrap (unless you used -- defaults-file)

And when you later start the server.

The new default config file was created as./my-new.cnf


The above prompt is running

scripts/mysql_install_db --user=mysql

This is because my. cnf already exists in my/usr/local/mysql/. rename it and try again.


Can I specify the Mysql configuration file/etc/mycnf to another directory?

Yes. However, you must set the mysql access permission.

How many mycnf configuration files does mysql need to create multiple instances?

The configuration file is still one, but the mysql database stores multiple directories, which configure the database storage directory based on your instance.
Configure multiple instances:
Initialize Database
[Mysql @ localhost ~] $ Mkdir/mydata/mysql_db/data_1001 # create a database storage directory
[Mysql @ localhost ~] $ Mkdir/mydata/mysql_db/data_1002
[Mysql @ localhost ~] $ Mkdir/mydata/mysql_db/data_1003
[Mysql @ localhost mysql_db] $./bin/mysql_install_db-basedir =/mydata/mysql_db-datadir =/mydata/mysql_db/data_1001-user = mysql # Database Initialization
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
Support-files/mysql. server to the right place for your system

Please remember to set a password for the MySQL root USER!
To do so, start the server, then issue the following commands:

/Mydata/mysql_db/bin/mysqladmin-u root password 'new-password'
/Mydata/mysql_db/bin/mysqladmin-u root-h localhost password 'new-password'

Alternatively you can run:
/Mydata/mysql_db/bin/mysql_secure_installation

Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Stronugly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon:
Cd/mydata/mysql_db;/mydata/mysql_db/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
Cd/mydata/mysql_db/mysql-test; perl mysql-test-run.pl

Please report any problems with the/mydata/mysql_db & ...... the remaining full text>
 

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.