免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2164 | 回复: 0
打印 上一主题 下一主题

MySql 091216 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-16 14:12 |只看该作者 |倒序浏览


  Normal
  0
  
  7.8 磅
  0
  2
  
  false
  false
  false
  
   
   
   
   
   
   
   
   
   
   
   
   
  
  MicrosoftInternetExplorer4



st1\:*{behavior:url(#ieooui) }
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:普通表格;
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
MySql 091216
@ http://zcatt.cublog.cn
Prepare
MySql 5.1.39

1.   
Post-installation
1) mysql_install_db
program sets up the grant tables. If you install by RPM, it is runned
automatically.

2) use mysqladmin
to verify the server is running.

mysqladmin
version
mysqladmin
variables
mysqladmin
ping
mysqladmin
–u root shutdown
mysql_safe
–user=mysql –log &
mysqlshow
2. install mysql.server manually
1) copy mysql.server
to /etc/init.d, and rename as mysql.
Make it executable

cp
mysql.server /etc/init.d/mysql
chmod
+x /etc/init.d/mysql

2) Set mysql service to run automatically
at sys startup

chkconfig
--add mysql
or
chkconfig
--level 345 mysql on

3) Config /etc/my.cnf file
The sections are read by script in my.cnf,
see the table.

  
  Script
  
  
  Option Groups
  


  
  
mysqld
  
  
  [mysqld], [server], [mysqld-major_version]
  


  
  
mysqld_safe
  
  
  [mysqld], [server], [mysqld_safe]
  


  
  
mysql.server
  
  
  [mysqld], [mysql.server], [server]
  


4) if err,
you can check the log files,  host_name.err and host_name.log

tail
host_name.err
tail
host_name.log

3.
Securing the accounts
2) The initial root passwd is empty.  One root account is for localhost, one is for
actual host name and IP number.

1) Two anonymous-user accounts are created
initally without passwd initially.

mysql
-u root
SET
PASSWORD FOR ‘’@’localhost’ = PASSWORD(‘newpwd’);
SET
PASSWORD FOR ‘’@’host_name’ = PASSWORD(‘newpwd’);

or remove the anonymous users

mysql
-u root
DROP
USER ‘’;

2) The initial root passwd is empty.  One root account is for localhost, one is for
actual host name and IP number.

mysql
-u root
SET
PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘newpwd’);
SET
PASSWORD FOR ‘root’@’hostname’=PASSWORD(‘newpwd’);

or

mysqladmin
-u root password “newPwd”
mysqladmin
-u root -h host_name password “newpwd”

or

mysql
-u root
update
mysql.user set password=PASSWORD(‘newpwd’) where user =’root’;
flush
privileges;


               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8866/showart_2122819.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP