Linux下MySQL安装完全版- -

0 views
Skip to first unread message

love0...@gmail.com

unread,
Mar 20, 2006, 9:08:09 PM3/20/06
to 52info
Linux下MySQL安装完全版- -
Tag: Linux MySQL

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> cd /usr/local/mysql
shell> ./bin/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> cp ./share/mysql/my-medium.cnf /etc/my.cnf

启动MySQL:
for mysql-4.*:
/usr/local/mysql/bin/mysqld_safe --user=mysql &
for mysql-3.*:
/usr/local/mysql/bin/safe_mysqld --user=mysql &


添加系统用户:
shell>/usr/local/mysql/bin/mysql
mysql>grant all privileges on *.* to username@'localhost' identified by
'passwd' with grant option;
mysql>grant all privileges on *.* to username@'%' identified by
'passwd' with grant option;
(增加可以从任何地方连接服务器的一个完全的超级用户username)
mysql>\q(退出mysql连接)
#mysqladmin reload(更新并重载权限表)

Reply all
Reply to author
Forward
0 new messages