LinuxSir.cn,穿越时空的Linuxsir!

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

mysql安装问题

[复制链接]
发表于 2007-7-23 16:45:04 | 显示全部楼层 |阅读模式
            
先是执行如下操作:  
  
1. 安裝MySQL  
(1) 解開壓縮包
cd /usr/local
  tar -zvxf mysql-3.23.32.tar.gz  
(2) 將產生mysql-3.23.32目錄移到/usr/local/mysql
mv mysql-3.23.32 /usr/local/mysql  
(3) 編譯MySQL
cd /usr/local/mysql  
./configure --prefix=/usr/local/mysql
   
 
然后提示:   
[root@localhost mysql]# ./configure --prefix=/usr/local/mysql
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 MySQL system tables...
OK
Filling help tables...
OK

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:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

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 http://shop.mysql.com
Starting the mysqld server.  You can test that it is up and running
with the command:
./bin/mysqladmin version
[root@localhost mysql]# chown: `mysql': invalid user
Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/localhost.localdomain.pid
070723 16:43:29  mysqld ended
      
       
于是打了一下make,就有如下提示了:   
make
make: *** No targets specified and no makefile found.  Stop.    
    

再往下打make install也是这样的了,请赐教。  
 
         
发表于 2007-7-24 08:54:11 | 显示全部楼层
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!
不是说了不用编译,直接可以用了(*^__^*)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-24 08:59:03 | 显示全部楼层
谢谢楼上谢谢楼上
回复 支持 反对

使用道具 举报

发表于 2007-7-24 09:00:12 | 显示全部楼层
下载的是二进制的安装包,只要复制到指定位置就可以了,不需要重新编译
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-24 09:23:56 | 显示全部楼层
不过还是运行不了    
/etc/rc.d/init.d/mysqld 此文件不存在  
运行mysql start也提示不存在  
/usr/local/mysql/share/mysql/mysql.server文件也不存大, 请问我还能怎么样处理呢?  
 
 
       
回复 支持 反对

使用道具 举报

发表于 2007-7-24 10:05:31 | 显示全部楼层
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> chown -R mysql .
     shell> chgrp -R mysql .
     shell> scripts/mysql_install_db --user=mysql
     shell> chown -R root .
     shell> chown -R mysql data
     shell> bin/mysqld_safe --user=mysql
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-24 10:17:27 | 显示全部楼层
Post by doking2008
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> chown -R mysql .
     shell> chgrp -R mysql .
     shell> scripts/mysql_install_db --user=mysql
     shell> chown -R root .
     shell> chown -R mysql data
     shell> bin/mysqld_safe --user=mysql

   
  能否做一下注解,而且path是不是要换成我电脑上具体的路径? 谢谢!  
              
 
 
                               
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-26 14:34:48 | 显示全部楼层
能否做一下注解,而且path是不是要换成我电脑上具体的路径? 谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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