mysql-5.0.51a-linux-i686.tar.gz安装问题~(其他的安装类似)
希望大家帮忙解决一下,谢谢拉!
[root@MMAPLinuxEnt4 local]# tar zxvf mysql-5.0.51a-linux-i686.tar.gz
.....
mysql-5.0.51a-linux-i686/include/myisampack.h
mysql-5.0.51a-linux-i686/include/my_alarm.h
mysql-5.0.51a-linux-i686/include/mysql_time.h
mysql-5.0.51a-linux-i686/include/my_alloc.h
mysql-5.0.51a-linux-i686/include/my_time.h
mysql-5.0.51a-linux-i686/include/m_string.h
mysql-5.0.51a-linux-i686/include/my_tree.h
mysql-5.0.51a-linux-i686/include/my_user.h
mysql-5.0.51a-linux-i686/COPYING
[root@MMAPLinuxEnt4 local]# ls
bin mysql-standard-4.0.23-pc-linux-i686
etc mysql-standard-4.1.7-pc-linux-i686
games mysql-standard-4.1.7-pc-linux-i686.tar.gz
include MySQL v5.0.27 For Red Hat 3 .rpm
lib MySQL v5.0.27 For SuSE Linux 9 RP.rpm
libexec sbin
mysql-5.0.51a-linux-i686 share
mysql-5.0.51a-linux-i686.tar.gz src
[root@MMAPLinuxEnt4 local]# ln -s mysql-5.0.51a-linux-i686 mysql
[root@MMAPLinuxEnt4 local]# ls
bin mysql-standard-4.0.23-pc-linux-i686
etc mysql-standard-4.1.7-pc-linux-i686
games mysql-standard-4.1.7-pc-linux-i686.tar.gz
include MySQL v5.0.27 For Red Hat 3 .rpm
lib MySQL v5.0.27 For SuSE Linux 9 RP.rpm
libexec sbin
mysql share
mysql-5.0.51a-linux-i686 src
mysql-5.0.51a-linux-i686.tar.gz
[root@MMAPLinuxEnt4 local]# cd mysql
[root@MMAPLinuxEnt4 mysql]# groupadd mysql
groupadd: group mysql exists
[root@MMAPLinuxEnt4 mysql]# useradd -g mysql mysql
useradd: user mysql exists
[root@MMAPLinuxEnt4 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 MMAPLinuxEnt4 password 'new-password'
Alternatively you can run:
./bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
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@MMAPLinuxEnt4 mysql]# Starting mysqld daemon with databases from
/usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/MMAPLinuxEnt4.pid
080326 19:21:19 mysqld ended
[root@MMAPLinuxEnt4 mysql]# ./scripts/mysql_install_db --user=mysql
Installing MySQL system tables...
080326 19:22:50 [Warning] No argument was provided to --log-bin, and --log
-bin-index was not used; so replication may break when this MySQL server
acts as a master and has his hostname changed!! Please use '--log-
bin=/var/lib/mysql/mysql/MMAPLinuxEnt4-bin' to avoid this problem.
./bin/mysqld: File '/var/lib/mysql/mysql/MMAPLinuxEnt4-bin.index' not found
(Errcode: 13)
080326 19:22:50 [ERROR] Aborting
080326 19:22:50 [Note] ./bin/mysqld: Shutdown complete
Installation of system tables failed!
Examine the logs in /var/lib/mysql/mysql for more information.
You can try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
and use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:
shell> ./bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql/mysql that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running
mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script
[root@MMAPLinuxEnt4 mysql]# ./bin/mysqld_safe &
[1] 23549
[root@MMAPLinuxEnt4 mysql]# Starting mysqld daemon with databases from
/var/lib/mysql/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
080326 19:26:37 mysqld ended
[root@MMAPLinuxEnt4 mysql]# chown -R root .
[root@MMAPLinuxEnt4 mysql]# chown -R mysql data
[root@MMAPLinuxEnt4 mysql]# chgrp -R mysql .
[root@MMAPLinuxEnt4 mysql]# chown -R mysql /var/run/mysqld/mysqld.pid
chown: failed to get attributes of `/var/run/mysqld/mysqld.pid': No such
file or directory
[root@MMAPLinuxEnt4 mysql]# bin/mysqld_safe --user=mysql &
[1] 23753
[root@MMAPLinuxEnt4 mysql]# Starting mysqld daemon with databases from
/var/lib/mysql/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
080326 19:28:04 mysqld ended
[1]+ Done bin/mysqld_safe --user=mysql
[root@MMAPLinuxEnt4 mysql]# bin/mysqladmin -u root passwor '1234'
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
[root@MMAPLinuxEnt4 mysql]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
-------------服务器目录上没有mysql.sock这个文件.
[root@MMAPLinuxEnt4 mysql]# bin/mysqladmin -u root passwor '1234'
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
[1]+ Done ./bin/mysqld_safe