How to install the new mysql version in linux

Source: Internet
Author: User
Welcome to the Linux community forum and interact with 2 million technical staff to access Typehelp; orhforhelp. login. mysqlmysqlmysqlmysqlselectversion (); + ----------- + | version () | + ----------- + | 5.5.29 | + -----

Welcome to the Linux community forum and interact with 2 million technical staff> enter Type 'help; 'or' \ H' for help. type '\ C' to clear the current input statement. mysql select version (); + ----------- + | version () | + ----------- + | 5.5.29 | + -----

Welcome to the Linux community forum and interact with 2 million technicians>

Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.

Mysql>

Mysql>

Mysql>

Mysql> select version ();

+ ----------- +

| Version () |

+ ----------- +

| 5.5.29 |

+ ----------- +

1 row in set (0.00 sec)

Note: If the mysql client is not installed, there will be no commands such as mysql and mysqladmin.

Or use the following command to log on to mysql:

# Mysql-u root-p

Enter password: (Enter the password)

-U is followed by the user name.-p requires the password. Press enter and enter the password at the Enter password.

Note: This mysql file is located in the/usr/bin directory. It is not a file with the Startup file/etc/init. d/mysql described later.

When installing mysql5.6, the installation package randomly generates a password for the root user, which is in the '/root/mysql_secret' file.

After logging on with mysql-u root-p [password], you must use the following command to change the password:

Mysql> set password = PASSWORD ('20140901 ');

If you do not execute set password, execute other commands and you will encounter the following error:

ERROR 1820 (HY000): You must set password before executing this statement

7. Generate the my. cnf File

By default, mysql does not generate the my. cnf file, but you can find a cnf file in the/usr/share/mysql/directory to generate the my. cnf file, as shown below:

Cp/usr/share/mysql/my-huge.cnf/etc/my. cnf

Edit my. cnf and modify or add the relevant parameters as needed.

[1] [2]

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.