Directly install and download the RPM package. Sometimes, the installation will fail due to the lack of MySQL dependent libraries.
You can run the following command to install the mysql client, server, and C Language Development Environment:
Sudo Yum install MySQL mysql-server mysql-devel
Refer:
[Root @ lee1 ~] # Sudo Yum install MySQL mysql-server mysql-devel
Loaded plug-ins: Presto, refresh-packagekit
Set the installation process
Package mysql-5.1.55-1.fc13.i686 installed and the latest version
Resolve Dependencies
--> Execute transaction check
---> Software Package mysql-devel.i686. 1.55-1. fc13 will be upgraded
---> Software Package mysql-server.i686. 1.55-1. fc13 will be upgraded
--> Processing dependency Perl (DBI), which is required by the package mysql-server-5.1.55-1.fc13.i686
--> Handle dependency Perl-DBD-MySQL, which is required by the software package mysql-server-5.1.55-1.fc13.i686
--> Handle dependency Perl-DBI, which is required by the software package mysql-server-5.1.55-1.fc13.i686
--> Execute transaction check
---> Software Package perl-DBD-MySQL.i686. 017-1.fc13 will be upgraded
---> Software Package perl-DBI.i686. 609-4.fc13 will be upgraded
--> Complete dependency Calculation
Dependency Solution
========================================================== ==========================================================
Package architecture version repository size
========================================================== ==========================================================
Installing:
Mysql-devel i686 5.1.55-1. fc13 updates 128 K
Mysql-server i686 5.1.55-1. fc13 updates 8.3 m
Install for dependency:
Perl-DBD-mysql i686 4.017-1. fc13 updates 137 K
Perl-DBI i686 1.609-4. fc13 fedora 707 K
During the installation process, the MySQL dependent database will be downloaded. At this time, make sure that the machine can connect to the Internet.
After installation, restart MySQL with the following command:
Service mysqld restart
Refer:
[Root @ lee1 ~] # Service mysqld restart
Stop mysqld: [OK]
Initialize the MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
Support-files/MySQL. Server to the right place for your system
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 lee1 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.
You can start the MySQL daemon:
CD/usr;/usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
Mysql-test-run.pl for CD/usr/MySQL-test; Perl
Please report any problems with the/usr/bin/mysqlbug script!
[OK]
Starting mysqld: [OK]
After successful restart, you can directly enter MySQL into the MySQL database.
Refer:
[Root @ lee1 ~] # MySQL
Welcome to the MySQL monitor. commands end with; or/g.
Your MySQL connection ID is 2
Server version: 5.1.55 Source Distribution
Copyright (c) 2000,201 0, Oracle and/or its affiliates. All rights reserved.
This software comes with absolutely no warranty. This is free software,
And you are welcome to modify and redistribute it under the GPL V2 license
Type 'help; 'or'/H' for help. type'/C' to clear the current input statement.
Mysql>