I blog on a (http://blog.csdn.net/tjcyjd/article/details/41646889) has been described in the configuration of Yum source, with Yum so install MySQL will be very simple, specifically as follows:
1. Install client and server sideVerify that MySQL is installed:
Yum List installed Mysql*rpm-qa | grep mysql*
To see if you have an installation package:
Yum List mysql*
To install the MySQL client:
Yum install MySQL
To install the MySQL server side:
Yum Install Mysql-serveryum Install Mysql-devel
2. Start and stop settingsDatabase Character Set settings
MySQL config file/etc/my.cnf add Default-character-set=utf8
To start the MySQL service:
Service mysqld Start
or/etc/init.d/mysqld start.
Set boot up:
Chkconfig-add mysqld
See if the boot setting is successful
Chkconfig--list | grep mysql*
Mysqld 0: Off 1: Off 2: Enable 3: Enable 4: Enable 5: Enable 6: Off
To stop the MySQL service:
Service Mysqld Stop
3, login and forget to change the passwordTo create a root administrator:
Mysqladmin-u Root Password 666666
Login:
Mysql-u root-p
If you forget your password, execute the following code
Service mysqld stopmysqld_safe--user=root--skip-grant-tablesmysql-u rootuse mysqlupdate user set Password=password (" 666666 ") where user=" root "; flush privileges;
4. Allow Remote access settingsPort number for open firewall
MySQL Add permission: The user table in the MySQL library has a new record of "%" and the user is "root".
Use MySQL; UPDATE user SET ' Host ' = '% ' WHERE ' user ' = ' root ' LIMIT 1;
% means all IP access is allowed
5. Several important directories of MySQL(a) Database directory
/var/lib/mysql/
(b) configuration files
/usr/share/mysql (mysql.server command and configuration file)
(c) Related orders
/usr/bin (Mysqladmin mysqldump and other commands)
(d) Startup scripts
/etc/rc.d/init.d/(startup script file for MySQL directory)
Install MySQL with Yum under Linux