[root@yangchehome bin]# ./mysqld_safe -user=mysql &
[1] 17135
[root@yangchehome bin]# 140316 16:04:48 mysqld_safe Logging to '/usr/local/mysql/data/yangchehome.err'.
140316 16:04:48 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
[root@yangchehome bin]# ps aux | grep mysql
root 17135 0.0 0.0 106188 1524 pts/0 S 16:04 0:00 /bin/sh ./mysqld_safe -user=mysql
mysql 17498 0.4 4.0 2408016 654856 pts/0 Sl 16:04 0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql -user=mysql --log-error=/usr/local/mysql/data/yangchehome.err --pid-file=/usr/local/mysql/data/yangchehome.pid --socket=/tmp/mysql.sock --port=3306
root 17536 0.0 0.0 103244 884 pts/0 S+ 16:07 0:00 grep mysql
[root@yangchehome bin]# mysqladmin -u root -p shutdown
Enter password:
[root@yangchehome bin]# ps ef | grep mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@yangchehome init.d]# mysqld restart
-bash: mysqld: command not found
[root@yangchehome init.d]# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[mysqld]
skip-name-resolve
catalina.sh
declare -x JAVA_OPTS="-Xms1024m -Xmx2048m"
[root@yangchehome bin]# ps aux | grep java
root 20258 183 2.3 4075036 385456 pts/1 Sl 18:50 0:09 /usr/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms1024m -Xmx2048m -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 20282 0.0 0.0 103244 880 pts/1 S+ 18:50 0:00 grep java
my.cnf新增配置项: (经过测试,添加table_cache = 614 ,skip-name-resolve 会报错!)
max_connections = 3000 back_log = 600
.sh文件都不是可执行文件,于是找到命令:
chmod +x *.sh
,这个命令的意思是让所有的.sh文件都可执行。再次执行sh catalina.sh通过,然后用sh startup.sh成功启动。
:w 保存文件但不退出vi :w file 将修改另外保存到file中,不退出vi :w! 强制保存,不推出vi :wq 保存文件并退出vi :wq! 强制保存文件,并退出vi q:不保存文件,退出vi :q!不保存文件,强制退出vi :e! 放弃所有修改,从上次保存文件开始再编辑