How to install MySQL 5.5 in RPM Mode Under CentOS 5.5

Source: Internet
Author: User

# Rpm-qa | grep-I mysql view installed mysql versions

Delete an existing mysql version

To install the server and client, go to the Oracle official website to download:

# Rpm-ivh MySQL-server-5.5.28-1.linux2.6.i386.rpm

# Rpm-ivh MySQL-client-5.5.28-1.linux2.6.i386.rpm

After installation, the following information appears, prompting you not to forget the password and other information of the root user.

Check whether mysql services are started # netstat-nat

If the port number is 3306, the service is started. The default port is 3306. If the port number is not started, start service # service mysql start to start the mysql service.

Then enter mysql. If the following message is displayed, it indicates that the operation is successful.

Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1
Server version: 5.5.16 MySQL Community Server (GPL)

Copyright (c) 2000,201 1, 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.

After entering the mysql database: mysql> use mysql;

Check the root user and select user and password form user;

Change password update user set password = password ('newpassword') where user = 'root' and host = 'root' or host = 'localhost ';

So far, mysql has been installed successfully.

However, remote access still does not work. There are two other places: Database setting and firewall. Generally, the database can be connected directly. I only do not have the ROOT permission. If I cannot connect to the server, the firewall will block me.

The database's MYSQL table controls the accessible permissions, so we need to change it so that we have the ROOT permission.

  • 1
  • 2
  • Next Page

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.