学海无涯

记录我的程序人生...

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  73 随笔 :: 2 文章 :: 68 评论 :: 13万 阅读
< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

 Source Installation Overview
----------------------------------

The basic commands you must execute to install a MySQL source
distribution are:

     shell> groupadd mysql
     shell> useradd -g mysql mysql
     shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
     shell> cd mysql-VERSION
     shell> ./configure --prefix=/usr/local/mysql
     shell> make
     shell> make install
     shell> cp support-files/my-medium.cnf /etc/my.cnf
     shell> cd /usr/local/mysql
     shell> bin/mysql_install_db --user=mysql
     shell> chown -R root  .
     shell> chown -R mysql var
     shell> chgrp -R mysql .
     shell> bin/mysqld_safe --user=mysql &

If you start from a source RPM, do the following:

     shell> rpmbuild --rebuild --clean MySQL-VERSION.src.rpm

Set Root Password for MySQL
 /usr/local/bin/mysqladmin -u root password 'new-password'


使用GRANT ... IDENTIFIED BY语句,来进行授权
GRANT select,insert,delete,update on dbname.* to  user@'%' IDENTIFIED BY 'manager';
这里PASSWORD()函数是不必要的,也不需要使用FLUSH PRIVILEGES来执行确认

posted on   josson  阅读(2027)  评论(0)    收藏  举报
点击右上角即可分享
微信分享提示