mysql5.0.22 unix 安装手记

来源:互联网 发布:南京小蜜蜂网络 编辑:程序博客网 时间:2024/05/22 05:22

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