groupadd mysql
useradd -g mysql mysql
/usr/local/mysql/bin
# ./configure --prefix=/usr/local/mysql /
#--with-charset=gb2312
开始编译并安装:
# make
# make install
#/usr/local/mysql/bin/mysql_install_db --user=mysql
##############
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/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h anet-if password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/mysql/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
###############
cd /usr/local/mysql
#chown -R root .
(注意后面有个”.")
#chown -R mysql var
#chgrp -R mysql .
#启动服务
./bin/mysqld_safe --user=mysql &
#访问服务
./bin/mysql -u root -p
本文介绍MySQL数据库从创建用户组到编译安装的过程,并指导如何设置开机启动、调整文件权限及启动服务。此外还提供了设置root密码的方法及一些重要的注意事项。
227

被折叠的 条评论
为什么被折叠?



