Académique Documents
Professionnel Documents
Culture Documents
Instead of searching and installing mysql and related packages one-by-one, it is better to install MySQL using yum groups. If you are interested in installing the full LAMP stack, refer to our earlier article on how to install/upgrade LAMP using yum.
mysql.i386 0:5.0.77-4.el5_4.2 mysql-connector-odbc.i386 0:3.51.26r11271.el5 mysql-server.i386 0:5.0.77-4.el5_4.2 perl-DBD-MySQL.i386 0:3.0007-2.el5 unixODBC.i386 0:2.2.11-7.1 Dependency Installed: libdbi.i386 0:0.8.1-2.1 libdbi-drivers.i386 0:0.8.1a-1.2.2 libtool-ltdl.i386 0:1.5.22-7.el5_4 mx.i386 0:2.0.6-2.2.2 perl-DBI.i386 0:1.52-2.el5 Complete!
Note: If you are having some issues during the installation, verify the full mysql install log to see what you are missing.
Check the /etc/passwd and /etc/group to make sure it has created a mysql username and group.
# grep mysql /etc/passwd mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash # grep mysql /etc/group mysql:x:27:
This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version Protocol version Connection UNIX socket Uptime: 5.0.77 10 Localhost via UNIX socket /var/lib/mysql/mysql.sock 39 sec Flush tables: 1
Threads: 1 Questions: 2 Slow queries: 0 Opens: 12 Open tables: 6 Queries per second avg: 0.051 # /usr/bin/mysqlshow +--------------------+ | Databases | +--------------------+ | information_schema | | mysql | | test | +--------------------+ # /usr/bin/mysqlshow mysql Database: mysql +---------------------------+ | Tables | +---------------------------+ | columns_priv | | db | | func | | help_category | | time_zone_transition | | time_zone_transition_type | | user | +---------------------------+
Stop and start the mysql server again to make sure they are no issues.
# service mysqld stop Stopping MySQL: # service mysqld start Starting MySQL: [ [ OK OK ] ]
| localhost | root | +-----------+------+ 5 rows in set (0.00 sec) mysql> set password for 'root'@'localhost' = PASSWORD('DoNotTell$AnyBody'); Query OK, 0 rows affected (0.00 sec) mysql> set password for 'root'@'127.0.0.1' = PASSWORD('DoNotTell$AnyBody'); Query OK, 0 rows affected (0.00 sec)
Make sure you are able to login to MySQL using the new password as shown below.
# mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.0.77 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
Share Comment
Awk Introduction 7 Awk Print Examples Advanced Sed Substitution Examples 8 Essential Vim Editor Navigation Fundamentals 25 Most Frequently Used Linux IPTables Rules Examples Turbocharge PuTTY with 12 Powerful Add-Ons
eBook
Tags: MySQL, MySQL Database Install, Yum groupinfo, Yum groupinstall, Yum grouplist { 13 comments read them below or add one } 1 Jose Vicente Mondejar April 29, 2010 at 6:54 am Clean and easy. I may use it someday 2 Ryan July 29, 2010 at 4:23 am Thanks a lot for this. Nice easy to follow guide. Was up and running in minutes. 3 Bob September 14, 2010 at 2:33 pm Exactly what I needed. Thanks! One more thing that people may find useful once you have MySQL running you can run /usr/bin/mysql_secure_installation to button up security a bit before going into production. 4 barth November 4, 2010 at 3:57 pm Nice , simple ,straight forward and accurate instructionsnice work. 5 Anand December 29, 2010 at 3:57 am Good and easy to follow. I was setting up Mysql on centos. this tutorial made it very easy and in one go was able to install. 6 Andy January 18, 2011 at 12:41 pm Thanks very much for producing this great guide Ive now got MySQL up and running. 7 manoj March 24, 2011 at 12:10 am excellent tutoril 8 Vinoth Kumar Lakshmanan August 2, 2011 at 10:40 am Fantastic 9 jon September 8, 2011 at 2:57 am Excellent tutorial. Many thanks 10 Casey September 14, 2011 at 11:16 pm Never have I seen it done so well, thanks!
11 revo November 8, 2011 at 1:30 am Hi Ramesh anna, i love you you rescued me many a times and its one more time 12 Bernichiwa December 28, 2011 at 8:18 am if mysql database does not work try teh following for group install MySql Database Server MySql Database Client 13 Thomas January 12, 2012 at 1:18 pm You guys are awesome. Thank You!