Linux build MySQL server

Source: Internet
Author: User

In the Linux environment, for users who do not have root privileges, you should use the source installation method.

1. First download the installation package:

wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.15.tar.gz

wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz

2, install CMake to the specified path, install MySQL to the specified path and port

Reference: blog.shenwei.me/install-mysql-without-root-privileges/

3. Configure the environment variables for MySQL

4. Set the start command My_mysql_start to start the port service, and close the command to shut down the port service

5, ls command not found

Solution: Go below the command line.
Export Path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

6, Root no command to add users after local login:

Mysql-h 127.0.0.1-p9099-u Root

SELECT * FROM Mysql.user

View current Users: Select User ();

! Note the way users are created:

If the specified user logon does not require a password when it is created, the user does not need a password when signing in, and if a password is required for the specified user login when it is created, the user will need a password at logon.

If you create a local user, the user cannot log in remotely, and if you create a remote user, can he log in remotely?

7. MySQL User table field explanation

Host field (hosts IP address or hostname):

In order to be able to access MySQL locally, use localhost or the loop address 127.0.0.1.

2) If you use the wildcard % as the host, allow the client to specify the user to connect from any host.

3) When the host is designated as 127.0.0.1, it will be connected via TCP/IP protocol and can only be accessed natively;

4) When the host is designated as localhost, localhost will not be resolved to an IP address, directly connected via Unixsocket.

Windows users use MySQL

1. View MySQL version: MySQL--version

2. Start MySQL service: Run "net start MySQL" command as administrator (stop is net stop MySQL)

To access the local database:

Linux build MySQL server

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.