存档

2015年3月 的存档

CentOS安装MySql

2015年3月23日 没有评论 1,157 views  

1.rpm -qa|grep -i mysql
2.
service mysql stop
/etc/init.d/mysql shutdown
service mysqld stop
/etc/init.d/mysqld shutdown
3.rpm -ev MySQL-client-5.5.25a-1.rhel5
rpm -e –nodeps MySQL-server-5.5.25a-1.rhel5 (-nodeps强制删)
4.find / -name mysql
rm -rf /var/lib/mysql
rm -rf /usr/lib64/mysql 等
rm -rf /etc/my.cnf
5.rpm -qa|grep -i mysql
6.yum list | grep mysql
7.yum install mysql
8.yum install mysql-server
9.rpm -qi mysql-server
10./etc/init.d/mysqld start 等
11.mysql [-uroot -p]
12.select user();
13.show grants for root@localhost;
14.update user set password=password(’123′) where user=’root’;
15.FLUSH PRIVILEGES;
16.GRANT ALL PRIVILEGES ON db.* TO ‘user_name’@'%’ IDENTIFIED BY ‘abc’ WITH GRANT OPTION;

分类: mysql, 数据库 标签:

MAC JAVA_HOME配置

2015年3月10日 没有评论 1,190 views  

1.which java(whereis java)
2.

$ ls -l /usr/bin/java  
lrwxr-xr-x  1 root  wheel  74 Jan  4 20:24 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

3.

$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions
total 64
lrwxr-xr-x  1 root  wheel   10  5 11  2014 1.4 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10  5 11  2014 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10  5 11  2014 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10  5 11  2014 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10  5 11  2014 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10  5 11  2014 1.6.0 -> CurrentJDK
drwxr-xr-x  8 root  wheel  272  5 12  2014 A
lrwxr-xr-x  1 root  wheel    1  5 11  2014 Current -> A
lrwxr-xr-x  1 root  wheel   59  5 11  2014 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

4.$ /usr/libexec/java_home
5.$ /usr/libexec/java_home -V
6.$ vim ~/.profile

JAVA_HOME=`/usr/libexec/java_home`
export JAVA_HOME
分类: java, mac 标签: