Install MySql in rhel3

Source: Internet
Author: User

1. Installation Package
Rpm-IVH MySQL-server-5.1.30-0.glibc23.i386.rpm

Error: said the above package depends on the perl-DBI-1.32-5.i386.rpm package, first install
Rpm-IVH perl-DBI-1.32-5.i386.rpm
If other packages are required, install

 

Reinstall
Rpm-IVH MySQL-server-5.1.30-0.glibc23.i386.rpm (server)
Rpm-IVH MySQL-client-5.1.30-0.glibc23.i386.rpm (client tools)
Rpm-IVH MySQL-devel-5.1.30-0.glibc23.i386.rpm (Development Library, header files, etc)

Rpm-IVH MySQL-shared-community-5.1.30-0.rhel3.i386.rpm (some shared libraries such as so)

2. Test
PS-Aux | grep mysqld

 

3. Configuration
By default, only the local machine can be connected to the root
Login: mysql-uroot-p-hlocalhost
Use MySQL;
Select host, user from user;
+ -------------- + ------ +
| Host | user |
+ -------------- + ------ +
| 127.0.0.1 | root |
| Localhost |
| Localhost | root |
| Rhel4-server |
| Rhel4-server | root |
+ -------------- + ------ +

Therefore, only the local machine can be logged on by the root user.
Note that if the user column is empty, you can log on anonymously on the local machine, that is, you can log on by entering MySQL.

 

1) Change the root password
Use MySQL;
Update user SET Password = PASSWORD ("new password") where user = 'name ';
Flush privileges;

 

2) make the local machine unable to log on anonymously
Use MySQL;
Delete from user where user = '';
Flush privileges;

 

3) Other machines can log on as root.
Use MySQL;
Update user set host = '%' where user = 'root' and host = '2017. 0.0.1 ';
Flush privileges;
Or 1), 3) the following statement is also available
Grant all privileges on *. * to root @ '%' identified by 'Password' with grant option;

4. Start and Stop
/Etc/init. d/MySQL start/stop/restart

 

5. Related Directories

/Usr/bin MySQL related commands
/Usr/lib/MySQL mysql-related library file *.
/Usr/include/MySQL header file *. h
/Usr/share/MySQL configuration file
/Usr/sbin mysqld and other commands

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.