安装mysql记录
[root@eegooserver3 ~]# groupadd mysql
[root@eegooserver3 ~]# useradd -g mysql mysql
[root@eegooserver3 ~]# cd /opt
[root@eegooserver3 opt]# tar zxvf mysql-5.1.63-linux-x86_64-glibc23.tar.gz
[root@eegooserver3 opt]# mv /opt/mysql-5.1.63-linux-x86_64-glibc23 /usr/local/mysql
[root@eegooserver3 opt]# cd /usr/local/mysql/
[root@eegooserver3 mysql]# ll
total 76
drwxr-xr-x. 2 7155 wheel 4096 Apr 16 16:57 bin
-rw-r--r--. 1 7155 wheel 17987 Apr 16 16:57 COPYING
drwxr-x---. 4 7155 wheel 4096 Apr 16 16:57 data
drwxr-xr-x. 2 7155 wheel 4096 Apr 16 16:54 docs
drwxr-xr-x. 2 7155 wheel 4096 Apr 16 16:54 include
-rw-r--r--. 1 7155 wheel 7605 Apr 16 16:57 INSTALL-BINARY
drwxr-xr-x. 3 7155 wheel 4096 Apr 16 16:57 lib
drwxr-xr-x. 4 7155 wheel 4096 Apr 16 16:55 man
drwxr-xr-x. 10 7155 wheel 4096 Apr 16 16:57 mysql-test
-rw-r--r--. 1 7155 wheel 2552 Apr 16 16:57 README
drwxr-xr-x. 2 7155 wheel 4096 Apr 16 16:57 scripts
drwxr-xr-x. 27 7155 wheel 4096 Apr 16 16:57 share
drwxr-xr-x. 5 7155 wheel 4096 Apr 16 16:57 sql-bench
drwxr-xr-x. 2 7155 wheel 4096 Apr 16 16:57 support-files
[root@eegooserver3 mysql]# chown -R mysql .
[root@eegooserver3 mysql]# chgrp -R mysql .
[root@eegooserver3 mysql]# cp support-files/my-huge.cnf /etc/my.cnf [root@eegooserver3 mysql]# scripts/mysql_install_db --user=mysql
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 eegooserver3 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!
[root@eegooserver3 mysql]# chown -R root .
[root@eegooserver3 mysql]# chown -R mysql data
[root@eegooserver3 mysql]# ln -s /usr/local/mysql/bin/mysqld_safe /usr/local/bin
[root@eegooserver3 mysql]# ln -s /usr/local/mysql/bin/mysql /usr/local/bin
[root@eegooserver3 mysql]# ln -s /usr/local/mysql/bin/mysqldump /usr/local/bin
[root@eegooserver3 mysql]# bin/mysqld_safe --user=mysql &
[1] 5425
[root@eegooserver3 mysql]# 120827 22:43:45 mysqld_safe Logging to '/usr/local/mysql/data/eegooserver3.err'.
120827 22:43:45 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
^C
[root@eegooserver3 mysql]# /usr/local/mysql/bin/mysqladmin -u root password 123456
[root@eegooserver3 mysql]# mysql -u root -p
Enter password: 123456
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.63-log MySQL Community Server (GPL)
Copyright (c) 2000, 2011,
Oracle and/or its affiliates. All