ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux 6 下安装Mysql 5.6.15

Linux 6 下安装Mysql 5.6.15

原创 Linux操作系统 作者:wiron 时间:2013-12-25 13:07:48 0 删除 编辑
Download MySQL 5.6.15 from http://dev.mysql.com/downloads/ 
shell> groupadd mysql //                                
shell> useradd -r -g mysql mysql //             
shell> cd /usr/local //                     
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz //                       
shell> ln -s full-path-to-mysql-VERSION-OS mysql //
shell> cd mysql shell> chown -R mysql . //                                   
shell> chgrp -R mysql . //                                              
shell> scripts/mysql_install_db --user=mysql //                                         
shell> chown -R root . //                                                 
shell> chown -R mysql data //                                                                    
shell> bin/mysqld_safe --user=mysql & //                                       
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server start Mysql
#/etc/init.d/mysql start  设置mysql的root 密码;注意设置密码的时候一定用password 函数。
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit

# /etc/init.d/mysql restart # mysql -uroot -p Enter password: <输入新设的密码newpassword>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/167471/viewspace-1064295/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-11-15

  • 博文量
    4
  • 访问量
    32041