Install MySQL5.1.7 in RedHatLinux5

Source: Internet
Author: User
Install MySQL5.1.7 in RedHatLinux5 [root @ linuxidc ~] # Cdhomeappmysql [root @ linuxidcmysql] # ls -- unzip the MySQL-community-5.1.7

Install MySQL 5.1.7 in RedHat Linux 5 [root @ linuxidc ~] # Cd/home/app/mysql [root @ linuxidc mysql] # ls -- decompress the MySQL-community-5.1.7

Install MySQL 5.1.7 in RedHat Linux 5

[Root @ linuxidc ~] # Cd/home/app/mysql
[Root @ linuxidc mysql] # ls

-- Extract
MySQL-community-5.1.73-1.rhel5.i386.rpm-bundle.tar
[Root @ linuxidc mysql] # tar-xvf MySQL-community-5.1.73-1.rhel5.i386.rpm-bundle.tar
MySQL-test-community-5.1.73-1.rhel5.i386.rpm
MySQL-embedded-community-5.1.73-1.rhel5.i386.rpm
MySQL-devel-community-5.1.73-1.rhel5.i386.rpm
MySQL-shared-compat-5.1.73-1.rhel5.i386.rpm
MySQL-shared-community-5.1.73-1.rhel5.i386.rpm
MySQL-server-community-5.1.73-1.rhel5.i386.rpm
MySQL-client-community-5.1.73-1.rhel5.i386.rpm
MySQL-community-debuginfo-5.1.73-1.rhel5.i386.rpm

-- Install
[Root @ linuxidc mysql] # rpm-ivh *. rpm
Preparing... ######################################## ### [100%]
1: mySQL-shared-community ################################### ####### [1, 13%]
2: mySQL-devel-community ################################### ####### [1, 25%]
3: mySQL-client-community ################################### ####### [1, 38%]
4: mySQL-community-debugin ################################### ####### [1, 50%]
5: mySQL-embedded-communit ################################### ####### [1, 63%]
6: mySQL-server-community ################################### ####### [1, 75%]

Please remember to set a password for the MySQL root USER!
To do so, start the server, then issue the following commands:

/Usr/bin/mysqladmin-u root password 'new-password'
/Usr/bin/mysqladmin-u root-h linuxidc.net password 'new-password'

Alternatively you can run:
/Usr/bin/mysql_secure_installation

Which will also give you the option of removing the test
Databases and anonymous user created by default. This is
Stronugly recommended for production servers.

See the manual for more instructions.

Please report any problems with the/usr/bin/mysqlbug script!

Starting MySQL... [OK]
Giving mysqld 2 seconds to start
7: mySQL-shared-compat ################################### ####### [1, 88%]
8: mySQL-test-community ################################### ####### [1, 100%]

-- Reset the root password
[Root @ linuxidc mysql] #/usr/bin/mysqladmin-u root-h linuxidc.net password 'root'
[Root @ linuxidc mysql] #/usr/bin/mysqladmin-u root password 'root'

-- Start the service
[Root @ linuxidc mysql] # service mysql start
Starting MySQL [OK]

-- Root logon
[Root @ linuxidc mysql] # mysql-uroot-proot
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 3
Server version: 5.1.73-community MySQL Community Server (GPL)

Copyright (c) 2000,201 3, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.

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

Mysql> select now ();
+ --------------------- +
| Now () |
+ --------------------- +
| 08:01:09 |
+ --------------------- +
1 row in set (0.00 sec)

-- Create a Remote Account

Mysql> grant all privileges on *. * TO test @ localhost identified by 'test' with grant option;
Query OK, 0 rows affected (0.00 sec)

Mysql> grant all privileges on *. * TO test @ "%" identified by 'test' with grant option;
Query OK, 0 rows affected (0.00 sec)

-- Refresh Permissions
Mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

Mysql> exit

-- Remote database user logon
[Root @ linuxidc mysql] # mysql-utest-ptest
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 4
Server version: 5.1.73-community MySQL Community Server (GPL)

Copyright (c) 2000,201 3, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.

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

Mysql> select now ();
+ --------------------- +
| Now () |
+ --------------------- +
| 08:02:36 |
+ --------------------- +
1 row in set (0.00 sec)

Mysql>


Mysql> exit
Bye
[Root @ linuxidc mysql] # exit
Logout
Last login: Sat Nov 22 07:53:02 2014 from 192.168.11.1

-- Copy the main configuration file
[Root @ linuxidc ~] # Cp/usr/share/mysql/my-huge.cnf/etc/my. cnf

-- Add skip-name-resolve to the main configuration file, and skip-grant-tables to speed up remote connection

-- Modify the mysql configuration file in my. add lower_case_table_name = 1 under [mysqld] In cnf (location cannot be wrong) (1 indicates case insensitive, 0 case sensitive), save and restart mysql

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.