LNMP中安装mysql5的一些问题及解决( 二 )


mysql.server mysql_test_data_timezone.sql
[root@localhost mysql]# cp share/mysql/mysql.server /etc/rc.d/init.d/mysql
[root@localhost mysql]# /etc/rc
rc rc1.d rc3.d rc5.d rc.d rc.sysinit
rc0.d rc2.d rc4.d rc6.d rc.local
[root@localhost mysql]# /etc/rc.d/init.d/mysql stop
Shutting down MySQL.STOPPING server from pid file /usr/local/mysql/var/localhost.localdomain.pid
SUCCESS!
[root@localhost mysql]# 080707 05:51:50 mysqld ended
[2]- Done bin/mysqld_safe --user=mysql
[root@localhost mysql]# /etc/rc.d/init.d/mysql start
Starting MySQL. SUCCESS!
[root@localhost mysql]# mysql
-bash: mysql: command not found
[root@localhost mysql]# cd ..
[root@localhost local]# cd mysql/
[root@localhost mysql]# bin/my
myisamchk mysql_find_rows
myisam_ftdump mysql_fix_extensions
myisamlog mysql_fix_privilege_tables
myisampack mysqlhotcopy
my_print_defaults mysqlimport
mysql mysql_install_db
mysqlaccess mysql_secure_installation
mysqladmin mysql_setpermission
mysqlbinlog mysqlshow
mysqlbug mysql_tableinfo
mysqlcheck mysqltest
mysql_client_test mysqltestmanagerc
mysql_config mysqltestmanager-pwgen
mysql_convert_table_format mysql_tzinfo_to_sql
mysqld_multi mysql_upgrade
mysqld_safe mysql_upgrade_shell
mysqldump mysql_waitpid
mysqldumpslow mysql_zap
mysql_explain_log
[root@localhost mysql]# bin/my
-bash: bin/my: 没有那个文件或目录
[root@localhost mysql]# bin/mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.40-log Source distribution
Type "help;" or "h" for help. Type "c" to clear the buffer.
mysql> mysqladmin -uroot password 123
-> ;
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 -uroot password 123" at line 1
mysql> mysqladmin -uroot password
-> ;
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 -uroot password" at line 1
mysql> quit
Bye
[root@localhost mysql]# bin/mysqladmin -uroot password
bin/mysqladmin: Too few arguments to change password
[root@localhost mysql]# bin/mysqladmin -uroot password 123
[root@localhost mysql]# bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 4
Server version: 5.0.40-log Source distribution
Type "help;" or "h" for help. Type "c" to clear the buffer.
mysql> quit
Bye
蛋疼不解释 。

推荐阅读