Can't connect to local MySQL server through socket '/ var / lib / mysql / mysql.sock'

Restart the computer server, vnc mysql connection is not simple to solve the following: 1. Vnc: running vncserver 2.mysql Not connected, an error Can't connect to local MySQL server through socket '/ var / lib / mysql / mysql.sock' (111)

The use of shell and iptables automatically reject malicious SSH server to test connectivity

The use of shell and iptables automatically reject malicious SSH server to test connectivity, e-mail notification of concurrent administrators. [Root @ server ~] # cat #! / Bin / bash TIME = `date +"% Y-% m-% d% H:% M:% S "` BADIP =

[Reserved] Log of Linux / etc / profile. ~ /. Bash_profile file during the execution of several

Reproduced source has been lost! If infringement, dashing this! I will remove as soon as possible! Linux in the log file to be executed when the process is as follows: Just log on Linux, the first start / etc / profile file, and then start the user d

Strong sell using sed and tr copy the directory structure

#!/bin/bash #=============================================================================== # # FILE: # # USAGE: ./ source dist # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Ter

shell to determine the file or directory exists with permissions

Tags: shell to determine the file or directory exists with permissions Source: #! / Bin / sh myPath = "/ var / log / httpd /" myFile = "/ var / log / httpd / access.lo

Code layer. The benefits of sub-module

The first and most fundamental one: the code of the whole abstract framework, context, and also isolate the specific changes. Not stratified, the logic inside a method written in the code is like a catalog of books is not to find which section of whi

How to close the windows on the process running on a particular port?

I have not run in eclipse tomcat. Tips that another process is using the port. But I do not know what the process, how to use the windows service manager stopped the process. The following is how to find and close the process method. netstat-a-o-n co

crontab last day of the month

How to set up crontab in a way to perform the last day of each month: for Linux 0 8 28-31 * * [`date-d tomorrow + \% e`-eq 1] & & (shell script) for other Unix, BSD 0 8 28-31 * * [`echo \` cal \ `| awk '{print $ NF}'`-eq 1] &

Linux array, remove duplicate values

#! / Bin / sh array = ("java" "linux" "c" "linux" "c + +" "java") len = $ {# array [@]} for ((i = 0; i <$ len; i + +)) do for ((j = $ len-1; j> i; j -)) do if [[$ {array [i]} = $ {arra

Bash string processing (and Java control) - 11 size to compare two strings (dictionary order. Numeric comparison)

Bash string processing (and Java control) - 11 size to compare two strings (dictionary order, numerical comparison) In Java String.compareTo int compareTo (String anotherString) Compares two strings lexicographically. If 0 is returned, indicating the

zabbix mysql comprehensive monitoring

Background: The management of multiple servers, there is a problem only went to view the log information on the specified machine. The cpu, mem usage in a log which can only know from personal experience to judge the cpu, mem, or io, or problems, cau

The second shell of the user interaction

#!/bin/bash declare -r RESET="\033[0m" declare -r RED="\033[31m" declare -r GREEN="\033[32m" declare -r YELLOW="\033[33m" declare -r UNDERLINE="\033[4m" declare -r BOLD="\033[1m" declare -r YESORNO="\033[1m\033[4mY\033[0mes,\033[1m\033[4mN\033[0mo" c

Universal kill shell shell

#!/bin/bash appName="appName" appPsCommond="appPsCommond" appPath="/home/appPath" isRunning(){ appPs=`ps -ef | grep "$appPsCommond" | grep -v "grep" | grep -v "stop" | awk ' { print $appPsCommond} '` if [ "$appPs" ] then return 0 fi return 1 } invoke

Hourly Statistics unix machine memory and cpu usage

Assign permissions to the script chmod 755 *. sh The background of the script nohup & x=0 totMem=`vmstat | grep 'mem=' | awk -F\= '{ print $3 }' | awk -F\M '{print $1 }'` totMem1=` echo "$totMem * 200 " | bc ` while true do strDate=`date +

How to install IE6 under Ubuntu

Only hope it's useful for guys have no choice but still have to use ie6, god damn it ~ You have to enable universe packages first. It is also recommended that you use the official winehq ubuntu package: 1) Open a terminal 2) Open / etc / apt / sources

struts2 form validation in field-validator type value

int integer; double real; Date date; Comparing the relationship between the expression of two numbers; email Email address; url visitor conversion regex regular expressions to validate; required is empty; requiredstring must be character; stringlengt

In Linux, how is one time those changes removed all the files for the specified date?

Q: In Linux, how is one time those changes removed all the files for the specified date? A: The script Usage:. / <YYYY-mm-dd> <files...> For example:. / 2011-09-01 html / *. h

exec shell command to establish a tcp connection and close connection

shell command to directly communicate with the java process to port, then you can use the exec 8> / dev/tcp/; if [ "$?" != "0" ];then echo "open $host $port fail!"; exit 1; fi echo "test">&8; exec 8>&- exit 0; Note:

lion vim highlight and brew install django

mac highlighted under the shell Highlight ---- -------- vim cp / usr / share / vim / vimrc ~ /. vimrc In. Vimrc file add the final syntax on ------- Used ubuntu's apt-get, redhat's yum The original mac ca

centos 5.6 configure jdk environment variable

#. Bashrc # User specific aliases and functions alias rm = 'rm-i' alias cp = 'cp-i' alias mv = 'mv-i' # Source global definitions if [-f / etc / bashrc]; then . / Etc / bashrc fi export JAVA_HOME = / usr/java/jdk1.6.0_27 expor

View and close ports

Click "Start → Run", type "cmd" and press Enter to open Command Prompt window. At the command prompt, type "netstat-a-n", press the Enter key after the display in digital form can be seen TCP and UDP port number and conn

View file with the shell if it contains a character

View abc.txt file contains a character Method One: grep a abc.txt >/dev/null && echo 'have' $? Variable: if executed successfully, returns 0, failure to return 1. Method Two: if [ `grep -c a abc.txt` -eq 0 ];then echo 'not have' else echo

I used Linux command of the: (colon) - what is not done (except for -)

I used Linux command of the: (colon) - what is not done (except ...) This link: (reproduced please indicate the source) Use Description We know that the Linux system, a colon (:) used to do the path separ

In the context menu to add Ubuntu terminal part

There may be many people from RedHat to Ubuntu and other Linux distributions to the above first encountered one of the most common problem is, right-click the desktop and found that there is no "open terminal" option, here are two ways to a

Shell script to play the game against

Soon my daughter in elementary school, she needs to play the game constraints. What she usually loves to play a 4399,3366, previously wrote a script, hand-parse IP, IP in the script will be added to the iptables rules. There is a new site to be disab

linux history shows the history of operating time

Changes in the current user directory. Bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export HISTTIMEFORMAT="%F %T "

oracle cursor through the records% rowtype

Then we use the Oracle cursor Cursor is divided into: static cursor and reference cursor (dynamic cursor) Static cursors: user-defined (implicit cursor, cursor display) the result set unchanged Reference cursor cursor: changes in the result set Impli

Linux shell script in the comparative figures for the size of

#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin ram_max=9 ram=10.2 #ram Is greater than the ram_max prints 1 Assign values to variables check check=`echo "$ram > $ram_max" | bc` # Determine if match check 1 Prin


source: REPORT ZTEST_FB02 . type-pools : TPIT. DATA : W_BSEG TYPE BSEG, W_message TYPE T100-TEXT. data : it_errtab TYPE tpit_t_errdoc WITH HEADER LINE, it_fldtab TYPE tpi

Linux background monitoring script

#! / Bin / sh <br> while true; do <br> ss7pid = `ps-ef | grep ss7d | awk '/ shcti / {print $ 2}'` <br> if test-z $ ss7pid; then <br > / usr/local/lib/shcti/ver4.7.17/ss7/ss7d & <br> echo `date + '% y-% m-

extension of the cd command

In linux, return to the previous directory you can use the command cd .., back to the directory can only be used on the two cd ../.., If you cd ... will complain. The following provides an easy method, you can use functions like cd .... Edit / root /

debian configuration folder color

the color change method debian directory 1 to modify ~ /. Bashrc in: # enable color support of ls and also add handy aliases if [ "$TERM" != "dumb" ]; then #eval "`dircolors -b`" eval "`dircolors ~/.dircolors`" alias ls='ls --color=auto' #alias dir='

nexus startup script --- the first shell script

Research maven for a while, have long mirrored storage nexus to build up, before the company was set up in the server above, so do not frequent to start nexus. But now at home want to build a nexus, have to start every boot nexus, out of trouble, jus

mongoDB parameter file

mongodb at startup, need to add a large lump behind the argument, this is very hard to maintain better mongodb and mysql, support parameter files Parameter file format: mongo.conf dbpath = /home/sdh/MongoDB/mongoData logpath = /home/sdh/MongoDB/mongo

shell command java program

#!/bin/sh CP=$CLASSPATH for files in ./libs/*.jar do CP=$CP:$files done if [ -n $DEBUG ] then echo CLASSPATH=$CP fi java -classpath .$CP com.test.MainTest

Use a clean svn hook automatically updates the file

Use the svn post-commit hook to do updates, pass parameters only REPOS and REV, one is the library name, a version number. Often the case that using svn update code, this will produce a lot. Svn version control files. Svn looked under the help and fo

PL / SQL (oracle) 2_ control structure

A control structure, branch structure 1, if Note: elsif and else If if( Conditions )then ... ... elsif ... ... end if ; 2, case Note: select case statement can omit the condition, when followed either a specific value, can also be one or more conditi

Shell script to reset the mysql database

#!/bin/bash user= pwd= function help_info(){ echo "Tool to reset mysql server" echo "Usage:" echo "$0 <user> <pwd>" } if [ $# -eq 2 ];then user=$1 pwd=$2 elif [ $# -ne 2 ];then help_info exit 1 fi src=/usr/local/mysql/data cd $src mv mysq

Export data into text format backup shell script

Tip: # export the contents of the table into a text format using the shell script # There are two ways (assuming the name of the script called unload): # 1. All of a user database # Export the contents of the table into a shell script in text format

Ubuntu9.10, that is the oracle from the start configuration

# Cp / etc / oratab / etc/oratab.bak.0 backup # Vim / etc / oratab ORCL: / opt/oracle/product/10.2.0/db_1: Y Is the bold part of the main Configuration / etc/init.d/oracle-10g startup script # Touch / etc/init.d/oracle-10g # Vim / etc/init.d/oracle-10g As

To talk about Oracle dba_free_space

As the name suggests, dba_free_space refers to the Oracle how much free space table space, and its view of the structure is quite simple: SQL> desc dba_free_space Name Null? Type ----------------------------------------- ---------- --------------------

Increase the maximum number of connections mysql

The maximum number of connections mysql default is 100, this value for a lot of concurrent connections the database application is not enough, it can be adjusted appropriately large, whereis safe_mysqld Safe_mysqld place to find and then edit it, fin

Whole database backup mysql

We often have to do a backup of the database, there are several database schema, very troublesome, write a script, ah, convenient The current user name, password, host death is written in the script, this is more convenient, a friend in need can chan

Timeout error occurred trying to start MySQL Daemon

# / Etc / init.d / MySQLd restart stopping mysql [ok] Start timeout Error occurred trying to MySQL Daemon. [failure] But this time mysql actually start, because with the netstat-ln command to see the 3306 port is already starting using mysql-u root-p pass

Timing tasks to configure DB2 AIX

1. <br /> Write sql script written to perform the DB2 sql script execution, and store it on the AIX server. Examples are as follows crontest.sql: connect to tem user db2admin using db2admin; call P_TEST(); 2. <br /> Write sh executable sh

ubuntu 8.10 install a comprehensive guide to Oracle 10G Enterprise Edition

ubuntu 8.10 install a comprehensive guide to Oracle 10G Enterprise Edition First, the system update to the latest (there may need to manually install a package libaio1) 1. Increase the swap partition (as required to determine whether to add) Installation

RMAN backup FORMAT format% meaning

In the configuration of Oracle 9i, use RMAN> show all; RMAN configuration parameters can be displayed as: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # d

informix massive data load program

#!/bin/ksh #=========================================================================== # Function : # Import massive amounts of data from the file into the informix database # Mainly to resolve the massive data into problems when

informatica workflow call shell scripts and returns processing status parameters

informatica, with a shell script called workflow, as long as the next path will be able to use it! The best parts posted for everyone to share, #!/bin/sh cd /oracle/app/infa/Server/server/bin if [ -f /backup/data/zktest/SES_MAP_IRS_DATA_REVISE_RECORD

linux 5 installation of Oracle 9i logging error

Operating system version Quote [Oracle @ zhoul oracle] $ uname-a Linux zhoul 2.6.18-164.el5 # 1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU / Linux In Oracle upgrade to Times the following error: Quote - Linking Oracle rm-f /
Recent Entries
Tag Cloud
Random Entries