mysql
-qa RPM | grep checks for older versions of MySQL query results: MySQL -libs-5.1.73-7 .el6.x86_64 RPM -e mysql- libs remove the old version of the RPM -e MySQL-libs - nodeps forcibly removed
Download c compiler tool
yum -y install the make gcc-c ++ cmake Bison-devel ncurses-devel
2.2 xftp connection to upload
Upload xftp connected to opt folder
1. tar -zxvf mysql-5.6.14.tar.gz 解压 2. cd mysql-5.6.14 切换目录 3.编译准备: cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -
DMYSQL_DATADIR=/usr/local/mysql/data -DSYSCONFDIR=/etc -
DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -
DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -
DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -
DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci 编译并安装: make && make install
2.4
1 . Create mysql groups, and users the groupadd mysql the useradd - G mysql mysql the passwd mysql 2 initialization configuration: 1.CD / usr / local / mysql 2.scripts / the mysql_install_db . 3 modify permissions: Modify / usr / local / mysql permissions chown MySQL -R: MySQL / usr / local / MySQL 4. when you start MySQL service will first find my.cnf in / etc directory, search will not find " $ basedir / my.cnf " , in this case, is / usr / local / MySQL / my.cnf to see / if there my.cnf under etc, have to change the name to prevent interference mv /usr/local/mysql/my.cnf / usr / local / MySQL / my.cnf. BAK 5. The added service (mysql service into the / etc /init.d), and set the boot from the start: 1.CP /usr/local/mysql/support-files/mysql.server /etc/init.d/ MySQL 2 .chkconfig MySQL ON . 3 .service MySQL Start . 6 . Configuration Environment variables: 1.vi / etc / Profile 2 was added in the file:. Export the PATH = / usr / local / MySQL / bin: $ the PATH 3.source / etc / Profile
Shell is a command line interpreter, which provides a system level application program sends a request to run the Linux kernel for the user
vim hello.sh
2. The script file coding
#!/bin/bash echo 'hello world'
Code explanation:
1.#!/bin/bash:
Tells the computer, use the bash interpreter to execute code
2.echo:
Console output
3. Run the script file
1 .hello.sh file path
bash hello.sh
Executable permission to the script
1 .hello.sh file path chmod 744 hello.sh 2. file path runs directly
./hello.sh
3.
1 . Single-line comments # content 2 . Multiline comments : << ! Content !
1.Linux in classification variables: system variables (system previously defined) Custom Variable
2. reference variable: $ variable name 3. System variables: $ the PATH $ the HOME $ PWD $ SHELL $ the USER 4. display all the current shell variable: set
2. The
1. Define the variable: variable name = variable value 2 revoked variables:. Unset variable name 3. static variable declaration: Readonly = variable name and the value of static variables can change value unset
1 Variable names can consist of letters, digits, and underscores, but can not start with a number 2 on both sides of the equal sign can not have spaces 3. The general custom variable name to uppercase
3.
LS = `1.A - la` Backticks, which run command, and returns the result to the variable A
2.A = $ (LS -la) equivalent to backticks
1.export variable name = variable value output to shell variable environment variable 2 .source profile allows configuration changes take effect immediately after the value of the variable value View 3.echo $ environment variable
. 1 . $ N-(Function Description: n = number, $ 0 for the command itself, $ 1- $ 9 represents a first parameter to the ninth, ten or more parameters, the parameters need to include ten or more braces, such as $ {10 } ) 2 . $ * (functional description: this variable represents all of the command line parameters, $ * all the parameters as a whole) 3 . $ @ (function description: this variable also represents all of the command line parameters, but $ @ parameters to each treated differently) 4 . $ # (functional description: this variable represents the command line parameters for all the number)
$$ (Functional Description: The current process process ID (PID)) $
(Function Description: Process number of the last process running in the background (PID))! $
(Function return the result to obtain) (Function Description:? Last execution return to command state if this variable is 0, prove that the last command executed correctly; If the value of this variable is non-zero (which specific numbers, to decide the order), then the proof on a command fails)
1 $ ((expression)). 2 $ [expression] ------. Recommended m + 3.`expr n` within the features: there must be a space between the operators + - / % \ * \ (\ )
[Condition] Note: conditions include a space before and after
special:
[non-empty] is to true
[] is false
[haha] && echo echo false to true ||
1.
= Equality has to
! = Not equal sentence
2.
- lt smaller than - Le less - gt larger than - GE greater than or equal - EG equal -ne not equal
-r have permission to read [- r file] -w have the authority to write [- w file path] -x Executive authority
-f file exists and is generally [- F File] - the presence of (a plurality) e file -d exists and is a directory
. 1 . IF [Condition] the then codes fi 2 . IF [Condition] the then codes else Code fi . 3 . IF [Condition] the then codes elif [Condition] the then codes else Code fi
case $ variable name in ' value 1 ' ) Code ;; ' value 2 ' ) Code ;; * ) Code execution did not hit ;; esac
for ((initial value; Cycling conditions; additional conditions)) do Code done
2. Usage of Two
for the variable in the value of the binary value 1. 3 do codes done
the while [Condition] do codes done
read options Variable Option: - the p-: prompt -t: waiting for input time
basename [pathname] [suffix]
to obtain the final part of the path
if the specified suffix, then the result will be removed in portions suffix
dirname [pathname]
obtained base path
function name of the function () { Code; # parameters: $ 1, $ 2, ..., 10} $ {... return XXX; } return result will be captured by whom: $? call: the function name value value 1 2