Yum install MySQL
Yum install mysql-Server
Yum install mysql-devel
Chgrp-r MySQL/var/lib/MySQL
Chmod-r 770/var/lib/mysqlservice mysqld start
MySQL
Set password for 'root' @ 'localhost' = PASSWORD ('secret _ password ');
Close!
Update
To allow access from other machinesMySQL. User
AddHost
Is'%'
OfUser, And thenFlush priviledges;
Finally, add a statement like this to the firewall (activate3306
Port ):
-A RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 3306-J accept
If you wantRebootSelf-starting:
Chkconfig -- levels 345 mysqld on
Install MySQL using yum in Linux
The method for installing software in yum is very simple, but first find a better source,
Centos5.3 the default source is good. There are many sources on the Internet.Article,
There are a lot of Google, so I will not introduce it here.
IfSource codeIf compilation is not successful, yum installation is a good choice, especially for beginners,
The installation process is very simple. Just enter Yum-y install mysql-server, and the system automatically downloads and installs MySQL,
Chkconfig -- add mysqld add MySQL service to the service list
Service mysqld Start Service Startup
Mysqladmin-u Root Password 'newpassword' Change Password
Mysql-u root-P mysql> drop database test; Delete the Test Database
Mysql> Delete from mysql. User where user = ''; delete an anonymous account
Mysql> flush privileges; reload Permissions
Add a MySQL user:
Grant all privileges on my_db. * To 'user' @ 'localhost' identified by 'Password ';
From: http://www.zouqingshui.net/headingto3/linux-yum-install-mysql/