終於解決上周遺留下來的mysql不能啟動的問題了,原因是之前安裝了兩次mysql,而且路徑不同,這裡有別人的詳細解決方案:http://www.linuxidc.com/Linux/2011-05/35409.htm
由於之前不知道問題所在,所以重新裝了一個虛擬機器,64bit的,前面不能make(zlib的問題,要對64機進行相應設定),編譯安裝成功後,又出現了不能啟動的問題,提示的問題如下:
111128 01:39:59 mysqld_safe Logging to '/opt/mysql5/var/debian.err'.touch: cannot touch `/opt/mysql5/var/debian.err': No such file or directorychown: cannot access `/opt/mysql5/var/debian.err': No such file or directory111128 01:39:59 mysqld_safe Starting mysqld daemon with databases from /opt/mysql5/varbin/mysqld_safe: line 100: /opt/mysql5/var/debian.err: No such file or directorybin/mysqld_safe: line 137: /opt/mysql5/var/debian.err: No such file or directory111128 01:39:59 mysqld_safe mysqld from pid file /opt/mysql5/var/debian.pid endedbin/mysqld_safe: line 100: /opt/mysql5/var/debian.err: No such file or directory
找了半天,沒查出原因。最後發現,原來只是個小問題,先bin/mysql_install_db --user=mysql一下,再啟動,問題解決!
另需要強調的是,安裝mysql前一定不要忘記這兩句:
groupadd mysql
useradd -g mysql mysql
接下來繼續解決mongodb的問題,搭環境真苦逼!
另my.cnf具體內容如下:
[client]port = 3306socket = /tmp/mysql.sock[mysqld]port = 3306bind-address = 0.0.0.0socket = /tmp/mysql.sockskip-external-lockingkey_buffer_size = 16Mmax_allowed_packet = 1Mtable_open_cache = 64sort_buffer_size = 512Knet_buffer_length = 8Kread_buffer_size = 256Kread_rnd_buffer_size = 512Kmyisam_sort_buffer_size = 8Mserver-id = 1innodb_data_home_dir = /opt/mysql5/varinnodb_data_file_path = ibdata1:10M:autoextendinnodb_log_group_home_dir = /opt/mysql5/varinnodb_buffer_pool_size = 700Minnodb_additional_mem_pool_size = 2Minnodb_log_file_size = 5Minnodb_log_buffer_size = 8Minnodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 50[mysqldump]quickmax_allowed_packet = 16M[mysql]no-auto-rehash[myisamchk]key_buffer_size = 20Msort_buffer_size = 20Mread_buffer = 2Mwrite_buffer = 2M[mysqlhotcopy]interactive-timeout