由 ministerwuxi 在 05-11-2003 12:08 发表:
mysql的安装和启动!
刚下载的mysql-3.23.44-pc-linux-gnu-i686.tar.gz
于是到redhat8下装
我把mysql-3.23.44-pc-linux-gnu-i686.tar.gz拷贝到/tmp下
我也不知道我下载的是二进制代码还是源代码,反正不 可以make 和 make install
大概是二进制的把
然后通过下列命令:
我是安装地点/usr/local/mysql
shell> gunzip < mysql-3.23.44-pc-linux-gnu-i686.tar.gz |tar xvf -
shell> ln - s mysql-3.23.44-pc-linux-gnu-i686 mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> bin/safe_mysqld &
但是启动的时候提示starting mysqld daemon from /.........../...
mysqld ended
启动不了
#cp mysql.server /etc/rc.d/init.d
#cd /etc/init.d
#chmod 500 mysql.server
#cd /etc/rc.d/rc3.d
#ln -s ../init.d/mysql.server S99mysql
然后/etc/rc.d/init.d/mysqld start
还是有错误@HOSTNAME@ bad command
mysqld ended
不知道怎么样才能正确安装和启动mysql
到网上找有关 这方面的内容没找到
请教各位!!!
由 dancingpig 在 05-11-2003 19:52 发表:
把你的二进制包解压缩到一个目录,如/usr/local/目录下。
执行以下命令:
ln -s myslq-3.23.xxxx(解压缩后的那个东东) mysql
addgroup mysql
useradd -g mysql mysql
cd mysq
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/data
chgrp -R mysql /usr/local/mysql
bin/safe_mysqld --user=mysql&
在启动前,应该把/usr/local/mysql/support-files/my-medium.cnf copy 成
/etc/my.cnf
由 dato 在 05-11-2003 20:40 发表:
The basic commands you must execute to install and use a MySQL binary distribution are:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/safe_mysqld --user=mysql &
or
shell> bin/mysqld_safe --user=mysql &
if you are running MySQL 4.x
- 为 root 设置密码
/usr/local/mysql/bin/mysqladmin -u root -p password your_new_password
注意,第一个 password 是命令的参数,依原样键入,而 your_new_password 就是你要设置的新密码。例如,要将 root 密码设为123456,那么这样输入命令:
/usr/local/mysql/bin/mysqladmin -u root -p password 123456
回车后系统会提示你输入当前密码,应该是像下面这样:
Enter password:
因为此时还没有密码,所以直接回车即可,这时没有任何提示返回提示符状态,而密码已经设置完成。此时可以通过关闭 MySQL 服务验证密码是否生效:
/usr/local/mysql/bin/mysqladmin -u root -p shutdown
Enter password:123456
系统提示 MySQL 已关闭:
020531 13:14:35 mysql ended
[1]+ Done /usr/local/mysql/bin/safe_mysqld --user=mysql
>