How to install and configure Mysql after oracle acquires Mysql

Source: Internet
Author: User
After oracle acquired Mysql, Mysql installation and configuration method bitsCN.com

How to install and configure Mysql after oracle acquires Mysql

Mysql downloaded on the oracle official website now has the following rpm packages

MySQL-client-advanced

MySQL-devel-advanced

MySQL-embedded-advanced-5.6.14-1.rhel5.x86_64.rpm

MySQL-server-advanced-5.6.14-1.rhel5.x86_64.rpm

MySQL-shared-advanced-5.6.14-1.rhel5.x86_64.rpm

MySQL-shared-compat-advanced-5.6.14-1.rhel5.x86_64.rpm

MySQL-test-advanced-5.6.14-1.rhel5.x86_64.rpm

1. First, find all the mysql instances installed in the system.

# Rpm-qa | grep-I after mysql runs this command, all lists are displayed:

Mysqlclient10-3.23.58-4.RHEL4.1

Mysqlclient10-devel-3.23.58-4.RHEL4.1

2. force delete the list one by one:

# Rpm-ev -- nodeps mysqlclient10-3.23.58-4.RHEL4.1.

# Rpm-ev -- nodeps mysqlclient10-devel-3.23.58-4.RHEL4.1.

3. manually delete several files of earlier versions:

# Rm-f/etc/my. cnf

# Rm-rf/var/lib/mysql

# Rm-rf/var/share/mysql

# Rm-rf/usr/bin/mysql *

4. install the downloaded mysql version,

[Root @ oracle11 ~] # Rpm-ivh MySQL-server-advanced-5.6.14-1.el6.x86_64.rpm

Preparing... ######################################## ### [100%]

1: mySQL-server-advanced ################################### ####### [1, 100%]

5. install the client

[Root @ oracle11 ~] # Rpm-ivh MySQL-client-advanced-5.6.14-1.el6.x86_64.rpm

Preparing... ######################################## ### [100%]

1: mySQL-client-advanced ################################### ####### [1, 100%]

Note: If mysql-client is not installed, you cannot log on to the mysql database using the mysql tool.

6. after oracle acquires Mysql, the new version of mysql cannot directly enter mysql to log on to the database after mysql is installed. Instead, the default free password is set, and the default password is stored in/root /. in the mysql_secret file, you need to change the password after logging on

After the installation is complete,

A randompassword has been set for the MySQL root USER!

You willfind that password in '/root/. mysql_secret '.

You must change thatpassword on your first connect,

No other statementbut 'set password' will beaccepted.

See the manual forthe semantics of the 'password expired' flag.

Also, the accountfor the anonymous user has been removed.

In addition, you canrun:

/Usr/bin/mysql_secure_installation

Which will also giveyou the option of removing the test database.

This is stronglyrecommended for production servers.

See the manual formore instructions.

Please report anyproblems with the/usr/bin/mysqlbug script!

The latestinformation about MySQL is available on the web

Http://www.mysql.com

Support MySQL bybuying support/licenses at http://shop.mysql.com

New default configfile was created as/usr/my. cnf and

Will be used bydefault by the server when you start it.

You may edit thisfile to change server settings

7. change password

(1) view the file and find the password

[Root @ oracle11 ~] # Vi/root/. mysql_secret

# The randompassword set for the root user at Mon Oct 28 11:09:39 2013 (local time): 3 eriwUfI

(2) log on to Mysql

[Root @ oracle11 ~] # Mysql-u root-p

Enter password:

Welcome to the MySQLmonitor. Commands end with; or/g.

Your MySQLconnection id is 3

Server version: 5.6.14-enterprise-defined cial-advanced

Copyright (c) 2000,2013, Oracle and/or its affiliates. All rights reserved.

Oracle is aregistered trademark of Oracle Corporation and/or its

Affiliates. Othernames may be trademarks of their respective

Owners.

Type 'help; 'or'/h' for help. type'/C' to clear the current input statement.

Mysql>

(3) change the password

Mysql> setpassword for 'root' @ 'localhost' = password ('root ');

Query OK, 0 rowsaffected (0.05 sec)

Of course, you can also use the script/usr/bin/mysql_secure_installation to interactively modify the mysql root password, as shown below:

[Root @ oracle11 ~] #/Usr/bin/mysql_secure_installation

NOTE: running all parts of this script is recommended for all MySQL

Servers in production use! Please read each step carefully!

In order to log into MySQL to secure it, we'll need the current

Password for the root user. If you 've just installed MySQL, and

You haven't set the root password yet, the password will be blank,

So you shoshould just press enter here.

Enter current password for root (enter for none ):

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL

Root user without the proper authorisation.

Set root password? [Y/n] y

New password:

Re-enter new password:

Password updated successfully!

Reloading privilege tables ..

... Success!

By default, a MySQL installation has an anonymous user, allowing anyone

To log into MySQL without having to have a user account created

Them. This is intended only for testing, and to make the installation

Go a bit smoother. You shoshould remove them before moving into

Production environment.

Remove anonymous users? [Y/n] n

... Skipping.

Normally, root shoshould only be allowed to connect from 'localhost'. This

Ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n

... Skipping.

By default, MySQL comes with a database named 'test' that anyone can

Access. This is also intended only for testing, and shocould be removed

Before moving into a production environment.

Remove test database and access to it? [Y/n] n

... Skipping.

Reloading the privilege tables will ensure that all changes made so far

Will take effect immediately.

Reload privilege tables now? [Y/n] n

... Skipping.

All done! If you 've completed all of the above steps, your MySQL

Installation shoshould now be secure.

Thanks for using MySQL!

Cleaning up...

BitsCN.com

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.