Build a Java Development Environment in Linux-Mysql installation tutorial in CentOS

Source: Internet
Author: User
Tags mysql download

I used CentOs5.5 when learning Linux. In this environment, there are many ways to install Mysql. Below I will only talk about the method that I succeeded this time as a record, for your reference, and make a note for yourself.

MySQL download

1. Enter the URL: http://dev.mysql.com/downloads/mysql/

2. In the URL, follow the instructions on the system platform. Because I use 32 bits, I downloaded 32-bit.

After the download is complete, copy it to the/usr/local directory of our virtual machine and double-click it to decompress the package (I do not know why the command is incorrectly decompressed ).

After decompression, you will find a file,

Although there are many files, what we really need is the two installation packages enclosed in blue boxes.

MySQL installation and troubleshooting

In the preceding two files, we must first install the server and install the client.

1. First enter the command to install the server:

2. After the server is successfully installed, enter the command to install the client:

3. after both of them have been installed successfully, mysql has no password. If the service is enabled, enter mysql-uroot-p directly, then press Enter to Enter, but after installation, I found that this is not the case, and there is still a problem of login failure.

mysql-->ERROR  (): Access denied  user @ ( password: NO) 

Therefore, we need to modify the mysql configuration, so input to terminate the mysql service.

4. Enter the following command:

5. After the fourth statement is executed, note that mysql is not displayed before.>

Exit mysql

And then enter the password we just modified to access mysql.

ERROR  (HY000): You must SET PASSWORD before executing  statement

This is a very strange problem. When I log in with a password, I still ask for a password. For more information, see http://dev.mysql.com/doc/refman/5.6/en/alter-user.html. After performing the following operations, you will be OK:

1. After executing the statement, we can use the mysql statement normally.

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.