。也不知道对不对。反正是起来了。。。。
[root@localhost ~]# ls
anaconda-ks.cfg install.log.syslog workspace
Desktop mysql-5.0.41-linux-i686-glibc23.tar.gz
install.log scsrun.log
[root@localhost ~]# chmod 755 mysql-5.0.41-linux-i686-glibc23.tar.gz
[root@localhost ~]# tar xfz mysql-5.0.41-linux-i686-glibc23.tar.gz
[root@localhost ~]# groupadd mysql
groupadd:mysql 组已存在
[root@localhost ~]# cd /
[root@localhost /]# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
[root@localhost /]# cd /usr/local/mysql
[root@localhost 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 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
[root@localhost mysql]# chown -R root
chown: “root” 后缺少操作数
请尝试执行“chown --help”来获取更多信息。
[root@localhost mysql]# chown -R root
chown: “root” 后缺少操作数
请尝试执行“chown --help”来获取更多信息。
[root@localhost mysql]# chown -R root .
[root@localhost mysql]# chown -R mysql data
[root@localhost mysql]# chown -R mysql data/.
[root@localhost mysql]# chgrp -R mysql .
[root@localhost mysql]# cd /
[root@localhost /]# /usr/local/mysql/bin/mysqld_safe --user=mysql &
[1] 32416
[root@localhost /]# Starting mysqld daemon with databases from /usr/local/mysql/data
[root@localhost /]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost /]# mysql
bash: mysql: command not found
[root@localhost /]# mysql
bash: mysql: command not found
[root@localhost /]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost /]# /usr/local/mysql/bin/mysqladmin -u root password 123+-*/
[root@localhost /]# /usr/local/mysql/bin/mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@localhost /]# /usr/local/mysql/bin/mysql -uroot -p123+-*/
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 3
Server version: 5.0.41-log MySQL Community Server (GPL)
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> exit
Bye
[root@localhost /]# /usr/local/mysql/bin/mysqladmin shutdown
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@localhost /]# /usr/local/mysql/bin/
bash: /usr/local/mysql/bin/: is a directory
[root@localhost /]# cd /usr/local/mysql/bin/
[root@localhost bin]# ysqladmin shutdown
bash: ysqladmin: command not found
[root@localhost bin]# ysqladmin shutdown
bash: ysqladmin: command not found
[root@localhost bin]# mysqladmin shutdown
bash: mysqladmin: command not found
[root@localhost bin]# ./mysqladmin shutdown
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@localhost bin]# /usr/local/mysql/bin/mysql -uroot -p123+-*/
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 6
Server version: 5.0.41-log MySQL Community Server (GPL)
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> mysqladmin shutdown
-> l
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqladmin shutdown
l' at line 1
mysql> exit
Bye
[root@localhost bin]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost bin]# ls
comp_err mysqld_safe ndb_config
make_sharedlib_distribution mysqldump ndb_cpcd
make_win_bin_dist mysqldumpslow ndbd
make_win_src_distribution mysql_explain_log ndb_delete_all
msql2mysql mysql_find_rows ndb_desc
myisamchk mysql_fix_extensions ndb_drop_index
myisam_ftdump mysql_fix_privilege_tables ndb_drop_table
myisamlog mysqlhotcopy ndb_error_reporter
myisampack mysqlimport ndb_mgm
my_print_defaults mysqlmanager ndb_mgmd
mysql mysql_secure_installation ndb_restore
mysqlaccess mysql_setpermission ndb_select_all
mysqlaccess.conf mysqlshow ndb_select_count
mysqladmin mysql_tableinfo ndb_show_tables
mysqlbinlog mysqltest ndb_size.pl
mysqlbug mysqltestmanager ndb_test_platform
mysqlcheck mysqltestmanagerc ndb_waiter
mysql_client_test mysqltestmanager-pwgen perror
mysql_config mysql_tzinfo_to_sql replace
mysql_convert_table_format mysql_upgrade resolveip
mysqld mysql_upgrade_shell resolve_stack_dump
mysqld-debug mysql_waitpid safe_mysqld
mysqld_multi mysql_zap
[root@localhost bin]# ./mysqladmin shutdown
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@localhost bin]# ./mysqladmin -uroot -p123+-*/ shutdown
STOPPING server from pid file /usr/local/mysql/data/localhost.localdomain.pid
070602 00:37:47 mysqld ended
[1]+ Done /usr/local/mysql/bin/mysqld_safe --user=mysql (wd: /)
(wd now: /usr/local/mysql/bin)
[root@localhost bin]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost bin]# netstat -ant
[root@localhost ~]# ls
anaconda-ks.cfg install.log.syslog workspace
Desktop mysql-5.0.41-linux-i686-glibc23.tar.gz
install.log scsrun.log
[root@localhost ~]# chmod 755 mysql-5.0.41-linux-i686-glibc23.tar.gz
[root@localhost ~]# tar xfz mysql-5.0.41-linux-i686-glibc23.tar.gz
[root@localhost ~]# groupadd mysql
groupadd:mysql 组已存在
[root@localhost ~]# cd /
[root@localhost /]# cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
[root@localhost /]# cd /usr/local/mysql
[root@localhost 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 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
[root@localhost mysql]# chown -R root
chown: “root” 后缺少操作数
请尝试执行“chown --help”来获取更多信息。
[root@localhost mysql]# chown -R root
chown: “root” 后缺少操作数
请尝试执行“chown --help”来获取更多信息。
[root@localhost mysql]# chown -R root .
[root@localhost mysql]# chown -R mysql data
[root@localhost mysql]# chown -R mysql data/.
[root@localhost mysql]# chgrp -R mysql .
[root@localhost mysql]# cd /
[root@localhost /]# /usr/local/mysql/bin/mysqld_safe --user=mysql &
[1] 32416
[root@localhost /]# Starting mysqld daemon with databases from /usr/local/mysql/data
[root@localhost /]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost /]# mysql
bash: mysql: command not found
[root@localhost /]# mysql
bash: mysql: command not found
[root@localhost /]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost /]# /usr/local/mysql/bin/mysqladmin -u root password 123+-*/
[root@localhost /]# /usr/local/mysql/bin/mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@localhost /]# /usr/local/mysql/bin/mysql -uroot -p123+-*/
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 3
Server version: 5.0.41-log MySQL Community Server (GPL)
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> exit
Bye
[root@localhost /]# /usr/local/mysql/bin/mysqladmin shutdown
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@localhost /]# /usr/local/mysql/bin/
bash: /usr/local/mysql/bin/: is a directory
[root@localhost /]# cd /usr/local/mysql/bin/
[root@localhost bin]# ysqladmin shutdown
bash: ysqladmin: command not found
[root@localhost bin]# ysqladmin shutdown
bash: ysqladmin: command not found
[root@localhost bin]# mysqladmin shutdown
bash: mysqladmin: command not found
[root@localhost bin]# ./mysqladmin shutdown
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@localhost bin]# /usr/local/mysql/bin/mysql -uroot -p123+-*/
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 6
Server version: 5.0.41-log MySQL Community Server (GPL)
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> mysqladmin shutdown
-> l
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqladmin shutdown
l' at line 1
mysql> exit
Bye
[root@localhost bin]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost bin]# ls
comp_err mysqld_safe ndb_config
make_sharedlib_distribution mysqldump ndb_cpcd
make_win_bin_dist mysqldumpslow ndbd
make_win_src_distribution mysql_explain_log ndb_delete_all
msql2mysql mysql_find_rows ndb_desc
myisamchk mysql_fix_extensions ndb_drop_index
myisam_ftdump mysql_fix_privilege_tables ndb_drop_table
myisamlog mysqlhotcopy ndb_error_reporter
myisampack mysqlimport ndb_mgm
my_print_defaults mysqlmanager ndb_mgmd
mysql mysql_secure_installation ndb_restore
mysqlaccess mysql_setpermission ndb_select_all
mysqlaccess.conf mysqlshow ndb_select_count
mysqladmin mysql_tableinfo ndb_show_tables
mysqlbinlog mysqltest ndb_size.pl
mysqlbug mysqltestmanager ndb_test_platform
mysqlcheck mysqltestmanagerc ndb_waiter
mysql_client_test mysqltestmanager-pwgen perror
mysql_config mysql_tzinfo_to_sql replace
mysql_convert_table_format mysql_upgrade resolveip
mysqld mysql_upgrade_shell resolve_stack_dump
mysqld-debug mysql_waitpid safe_mysqld
mysqld_multi mysql_zap
[root@localhost bin]# ./mysqladmin shutdown
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@localhost bin]# ./mysqladmin -uroot -p123+-*/ shutdown
STOPPING server from pid file /usr/local/mysql/data/localhost.localdomain.pid
070602 00:37:47 mysqld ended
[1]+ Done /usr/local/mysql/bin/mysqld_safe --user=mysql (wd: /)
(wd now: /usr/local/mysql/bin)
[root@localhost bin]# netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:59468 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:824 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
[root@localhost bin]# netstat -ant