湖濱散記部落格的樹心幽徑[login][主頁]
346:20161011 mysql-5.0.27-setup OK

(1)
ftp> mget  mysql-5.0.27.tar.gz
mget mysql-5.0.27.tar.gz? y
227 Entering Passive Mode (163,25,20,2,66,43).
150 Opening BINARY mode data connection for mysql-5.0.27.tar.gz (25867740 bytes).
226 Transfer complete.
25867740 bytes received in 12.3 secs (2098.56 Kbytes/sec)
ftp> quit
221 Goodbye.
[root@stop ~]#

[root@stop ~]# tar xvzf mysql-5.0.27.tar.gz

(2)

[root@stop mysql-5.0.27]# cat INSTALL-SOURCE

(3)

[root@stop mysql-5.0.27]# cat /etc/passwd|grep mysql
mysql:x:1001:1001::/home/mysql:/bin/bash
[root@stop mysql-5.0.27]# cat /etc/group|grep mysql
mysql:x:1001:


(4)

[root@stop mysql-5.0.27]# ./configure --prefix=/usr/local/mysql
:
Thank you for choosing MySQL!

[root@stop mysql-5.0.27]#


(5)

[root@stop mysql-5.0.27]# make

(6)

[root@stop mysql-5.0.27]# make install


(7)

[root@stop mysql-5.0.27]# cp support-files/my-medium.cnf /etc/my.cnf
cp:是否覆寫 ‘/etc/my.cnf’? y
[root@stop mysql-5.0.27]#



(8)
[root@stop mysql-5.0.27]# cd /usr/local/mysql

[root@stop mysql]# bin/mysql_install_db --user=mysql
Installing all prepared tables
Fill help tables

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:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h stop password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

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

Please report any problems with the /usr/local/mysql/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


(9)
[root@stop mysql]#  cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
[1] 20720
[root@stop mysql]# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /usr/local/mysql/var

[root@stop mysql]#

[root@stop mysql]# ps ax|grep mysql
17777 pts/1    S+     0:00 grep --color=auto mysql
[root@stop mysql]#



(10)
[root@stop mysql]# ps ax|grep mysql
20720 pts/1    S      0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
20741 pts/1    Sl     0:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --pid-file=/usr/local/mysql/var/stop.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock
20751 pts/1    S+     0:00 grep --color=auto mysql
[root@stop mysql]#

(11)
[root@stop mysql]# /usr/local/mysql/bin/mysqladmin -u root password 'w?????'
[root@stop mysql]#

[root@stop mysql]# /usr/local/mysql/bin/mysql -p -uroot
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.27-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye
[root@stop mysql]#


(12)

[root@stop mysql]# cd /usr/local/mysql
[root@stop mysql]# chown -R root  .
[root@stop mysql]# chown -R mysql var
[root@stop mysql]# chgrp -R mysql .
[root@stop mysql]# ls -l
總計 40
drwxr-xr-x 2 root  mysql 4096 10月 11 13:21 bin
drwxr-xr-x 3 root  mysql 4096 10月 11 13:21 include
drwxr-xr-x 2 root  mysql 4096 10月 11 13:21 info
drwxr-xr-x 3 root  mysql 4096 10月 11 13:21 lib
drwxr-xr-x 2 root  mysql 4096 10月 11 13:21 libexec
drwxr-xr-x 4 root  mysql 4096 10月 11 13:21 man
drwxr-xr-x 7 root  mysql 4096 10月 11 13:21 mysql-test
drwxr-xr-x 3 root  mysql 4096 10月 11 13:21 share
drwxr-xr-x 5 root  mysql 4096 10月 11 13:21 sql-bench
drwx------ 4 mysql mysql 4096 10月 11 13:23 var
[root@stop mysql]#


(13)
[root@stop mysql]# cp bin/mysql /usr/local/bin
[root@stop mysql]# date
二 10月 11 13:29:47 CST 2016
[root@stop mysql]#


select id,article_id,topic,text from lt_articles_text where article_id =346; ok. update lt_articles set num_reads=num_reads +1 where id=346; ok.