centos6.5下使用yum安装mysql
前端之家收集整理的这篇文章主要介绍了
centos6.5下使用yum安装mysql,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
# rpm -ev --nodeps MysqLxxx
# rm -rf 目录
再次复查
/*运行结果:*******************************************/
安装:
/*运行结果:********************************************/
..................省略部分以上内容
@H_
301_153@
查看刚安装好的MysqL版本
/*运行结果:********************************************************************************************************************/
翻译:
启动msyql
/*运行结果:****************************************************/
[root@kiven-centos ~]# service MysqLd start
Initializing MysqL database: WARNING: The host 'kiven-centos' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MysqL privileges !
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 kiven-centos 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
strongly 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.pl
-------
Please report any problems with the /usr/bin/MysqLbug script!
/*运行结果【end】****************************************************/
翻译:
初始化MysqL数据库:警告:主机的“kivencentos”不能用resoleip查找。
这可能意味着您的libc库并不是100%兼容的
通常情况下,主机名解析不会起作用。
这意味着你应该使用IP地址而不是主机名
------
-------
为此,启动服务器,然后发出以下命令:
/usr/bin/MysqLadmin -u root password 'new-password'
/usr/bin/MysqLadmin -u root -h kiven-centos password 'new-password'
或者您可以运行:
/usr/bin/MysqL_secure_installation
这也可以让你选择取消测试
强烈推荐生产服务器。
---------
更多的说明请参阅手册。
cd /usr ; /usr/bin/MysqLd_safe &
-----------
请报告/usr/bin/MysqLbug脚本的任何问题!
这段话的重点:
1、在安装MysqL后,会创建一个 msyqld进程
2、设置root密码 :MysqLadmin -u root password 'new-password'
/*运行结果:********************************************************************************************************************/
MysqLd (pid 2083) is running...
/*运行结果:********************************************************************************************************************/
# chkconfig --list|grep MysqLd
MysqLd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
/*********************************************************************************************************************/
/***************************************************************************************/
MysqLd 0:off 1:off
2:on 3:on 4:on 5:on
6:off
/***************************************************************************************/
# MysqLadmin -u root password '123456'
# netstat -anp|grep 3306