LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1448|回复: 9

mysql自启动不了

[复制链接]
发表于 2002-12-20 09:43:53 | 显示全部楼层 |阅读模式
系统是  
redhat8.0  
apache1.3.27  
MySQL 3.23.54a Linux (x86, libc6) (9.4M)  
我将  
mysql.server

copy 到  
/ctc/rc.d/inin.d/下  

自启动不了  
在setup中也看不到mysql选项(copy后已修改文件名了)  

重新启动机子也没有启动mysql
请问是什么原因呀
发表于 2002-12-20 11:13:11 | 显示全部楼层
./configure  --prefix=/usr/local/mysql
make
make install  
mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
cp support-files/my-medium.cnf /etc/my.cnf
cp mysql.server /etc/init.d
ln -s ../init.d/mysql.server S70mysql
ln -s ../init.d/mysql.server K70mysql

#重起计算机即可
 楼主| 发表于 2002-12-20 11:17:24 | 显示全部楼层

MySQL 3.23.54a Linux (x86, libc6) 不需要configure就可以用了

解压下来就可了呀
 楼主| 发表于 2002-12-20 11:18:43 | 显示全部楼层

you see it

[root@wujiajin mysql-3.23.54a-pc-linux-i686]# ./configure
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you. If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Installing all prepared tables
021218 21:31:29 ./bin/mysqld: Shutdown Complete


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 !
This is done with:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h wujiajin password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./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 . ; ./bin/safe_mysqld &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the ./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 https://order.mysql.com

Starting the mysqld server. You can test that it is up and running
with the command:
./bin/mysqladmin version
发表于 2002-12-20 11:28:24 | 显示全部楼层
不用mysql.server,直接执行安装目录下的bin/safe_mysqld &就可以了
要自动启动,就把这句命令加到/etc/rc.local里
 楼主| 发表于 2002-12-20 22:03:35 | 显示全部楼层

我这样怎么还不行呀

在rc.local中
sh -c 'cd/root/Tools/mysql-3.23.54a-pc-linux-i686;./bin/safe_mysqld --user=root &'
mysql还没有启动
请问系统启动的日志在哪个目录文件中呀
发表于 2002-12-20 22:23:41 | 显示全部楼层
那你要查看/root/Tools/mysql-3.23.54a-pc-linux-i686/var下的
主机名.err
文件,看有没有什么出错提示。

另外,如果你贴上来的命令就是从你rc.local文件里拷贝出来的话,那有一个错误,cd命令后面要加空格。
 楼主| 发表于 2002-12-21 18:39:55 | 显示全部楼层

sh -c 'cd /root/Tools/mysql-3.23.54a-pc-linux-i686;./bin/safe_mysqld --user=r

sh -c 'cd /root/Tools/mysql-3.23.54a-pc-linux-i686;./bin/safe_mysqld --user=root &'
这样就可以了
请问sh -c
-c是什么意思
发表于 2002-12-23 09:58:30 | 显示全部楼层
执行后面引号里的命令
发表于 2002-12-24 10:55:48 | 显示全部楼层
你下载的 mysql-3.23.54a-pc-linux-i686 是二进制版本,当然不要configure了。
源码编译当然要configure了。

使用mysql.server启动脚边非常安全,可以保证mysql在关机时完全的FLUSH内存数据。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表