To add a source outside the system:
http://kernal.blog.51cto.com/8136890/1426095
[1] Install Mysql Server
# yum -y install mysql-server# /etc/rc.d/init.d/mysqld startinitializing mysql database: warning: the host ' webserver1.lisys.cn ' could not be looked up with resolveip. this probably means that your libc libraries are not 100 % compatiblewith this binary MySQL version. The MySQL daemon, mysqld, should worknormally with the exception that host name Resolving will not work. this means that you should use ip addresses instead of hostnameswhen specifying mysql privileges ! Installing mysql system tables ... Okfilling help tables ... ok to start mysqld at boot time you have to Copysupport-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 webserver1.lisys.cn password ' New-password ' Alternatively you can run:/usr/bin/mysql_secure_installation # Initialize mysql which will also give you the option with this command of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers. See the manual for more instructions. you can start the mysql daemon with:cd /usr ; /usr/bin/ mysqld_safe & you can test the mysql daemon with mysql-test-run.plcd /usr/mysql-test ; perl mysql-test-run.pl please report any problems with the /usr/bin/mysqlbug script! [ OK ]Starting mysqld: [ ok ]# chkconfig Mysqld on
[2]configure Mysql
# /usr/bin/mysql_secure_installation note: running all parts of this script is recommended for all mysql servers IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into mysql to secure it, we ' ll need the currentpassword for the root user. if you ' ve just Installed mysql, andyou haven ' t set the root password yet, the password will be blank,so you should just press enter here. Enter current password for root (Enter for none): ok, Successfully used password, moving on... setting the root password ensures that nobody can log into the mysqlroot user without the proper authorisation. set root password? [y/n] ynew password: # Enter the password set for root re-enter new password: # re-enter the password password updated successfully! Reloading privilege tables. ... Success! By default, a MySQL installation has an anonymous user, allowing anyoneto log into mysql without having to have a user account created forthem. this is intended only for testing, and to make the installationgo a bit smoother. you shouLd remove them before moving into aproduction environment. remove anonymous users? [Y/n] y # Remove Anonymous user ... success! Normally, root should only be allowed to connect from ' localhost '. thisensures that someone cannot guess at the root  PASSWORD FROM THE NETWORK. DISALLOW ROOT LOGIN REMOTELY? [Y/N] y # does not allow root remote login ... success! by default, mysql comes with a database named ' Test ' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment. remove test Database and access to it? [y/n] y # Delete Test Database - dropping test database ... ... success! - removing privileges on test database... .. success!http://www.server-world.info/en/note?os=centos_6&p=zabbix&f=1 reloading the privilege tables will ensure that all changes made so FARWILL TAKE EFFECT IMMEDIATELY. RELOAD PRIVILEGE TABLES NOW? [Y/N] y # Reload Permissions Table ... success! cleaning up... all done! if you ' ve completed all of the above steps, your mysqlinstallation should now be secure. thanks for using Mysql!
The MySQL Server 5.1.73 installation is complete!
This article is from the "Siberian Wolf" blog, please make sure to keep this source http://kernal.blog.51cto.com/8136890/1426121