Install MySQLServer5.0 on Linux

Source: Internet
Author: User
. [1] extract the above files to a specific location and use MySQL (the best combination with PHP)

The following article describes how to correctly install MySQL Server Plugin on Linux. [1] extract the above files to a specific location and use MySQL (the best combination with PHP)

The following article describes how to correctly install MySQL Server Plugin on Linux.

[1] decompress the above file to a certain place, and change the directory name of MySQL (the best combination with PHP) to MySQL (the best combination with PHP ), the result should be as follows:/home/jiang/MySQL (the best combination with PHP)

[2] INSTALL MySQL Server 5.0 Based on the INSTALL-BINARY file in the MySQL (best combination with PHP) Directory

Add the user group MySQL (the best combination with PHP) and the user MySQL (the best combination with PHP). You do not need to modify shell> groupadd MySQL (the best combination with PHP)

Shell> useradd-g MySQL (the best combination with PHP)

The main purpose of the following three steps is to decompress the directory of MySQL (the best combination with PHP) and put it in the usr/local directory.

First, enter the/usr/local directory. This command does not need to be modified.

 
 
  1. shell> cd /usr/local

This step is not required because it has been decompressed.

 
 
  1. Shell> gunzip </PATH/TO/mysql(and php ))))-version-os.tar.gz | tar xvf-

Make a link to/home/jiang/MySQL (the best combination with PHP) and put it in/usr/local, the name of this link is MySQL (the best combination with PHP ).

This command is changed to ln-s/home/jiang/MySQL (the best combination with PHP)

Shell> ln-s FULL-PATH-TO-MySQL (the best combination with PHP)-VERSION-OS MySQL (the best combination with PHP)

Go to the/home/jiang/MySQL (best combination with PHP) directory,/usr/local/MySQL (best combination with PHP) is the link to/home/jiang/MySQL (the best combination with PHP)

Shell> cd MySQL (best combination with PHP)

Initialize MySQL (the best combination with PHP) (this step can be simplified if MySQL Server 5.0 has been installed before (the best combination with PHP ); this command does not need to be modified

Shell> scripts/MySQL (the best combination with PHP) _ install_db -- user = MySQL (the best combination with PHP)

Change ownership; this command does not need to be modified

 
 
  1. Shell> chown-R root.
  2. Shell> chown-R MySQL (the best combination with PHP) data
  3. Shell> chgrp-R MySQL (the best combination with PHP ).

Start the MySQL (the best combination with PHP) server. This command does not need to be modified.

 
 
  1. Shell> bin/MySQL (the best combination with PHP) d_safe -- user = MySQL (the best combination with PHP )&

[3] enter the MySQL (best combination with PHP) application environment

Go to the bin directory under the MySQL (best combination with PHP) directory and run the command. /MySQL (the best combination with PHP)-u root-p, the password will appear: (enter the password is required), but by default the root user does not have a password, so press Enter. In this case, the MySQL (the best combination with PHP) interface is displayed. Of course, it is still a command line window.

[4] simple use of MySQL (the best combination of PHP and MySQL)

Run the show databases command in the MySQL (best combination with PHP) environment, and the existing database (such as test) will be displayed; run the command use test, will enter the test database...

Note: after running./MySQL (the best combination with PHP)-u root-p

 
 
  1. Can't connect to local MySQL (the best combination with PHP) server through socket '/tem/MySQL (the best combination with PHP). sock'

The following situations may occur:

[1] MySQL (the best combination with PHP ). sock is not in the/tmp directory, but in another directory (for example,/var/lib/MySQL (the best combination with PHP ). In this case, you only need to link this MySQL (the best combination with PHP). sock to the/tmp directory and run the command:

Ln-s MySQL (the best combination with PHP). SOCK_PATH/tmp/MySQL (the best combination with PHP). sock

[2] MySQL (the best combination with PHP). sock is generated under/tmp in a classmate's notebook Linux, but the file is deleted after Linux is restarted. You can also use the solution in Case 2, or run the following command every time:

. /MySQL (the best combination with PHP) d_safe -- user = MySQL (the best combination with PHP) & the above content is an introduction to installing MySQL Server 5.0 on Linux, I hope you will have some gains.

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.