?? mysql ??, ??, ?? ? ??? ?????.
Aug 08, 2016 am 09:25 AM??
?? ? ?? ??? ???? ???? ???? ??? ?? ??? ?? PHP? ??? ??????. ??? ?? ????? PHP? ??? PHP? mysql ??? ????? ???? ?? ???? ??? ? ????. mysql ???? ??? ???? ????? ???? ????. ??? ?? Linux ??? ????? ??? ? ??? ? ??? ???????.
?? mysql? ??? ??????
? ?? mysql? ??? mysql ??? ?? ????? ?? ???? ???? ???, ?? ????? ?????.
<code>-e, --execute=name Execute command and quit. (Disables --force and history file.)</code>??? ??? ?? mysql -e? ?? ???? ??? ? ????.
<code>mysql -hlocalhost -P3306 -uroot -p123456 $test --default-character-set=utf8 -e "select * from users"</code>?? ? ?? ??? ?????.
??? ????
<code>MYSQL="mysql -h192.168.1.102 -uroot -p123456 --default-character-set=utf8 -A -N" #這里面有兩個參數(shù),-A、-N,-A的含義是不去預讀全部數(shù)據(jù)表信息,這樣可以解決在數(shù)據(jù)表很多的時候卡死的問題 #-N,很簡單,Don't write column names in results,獲取的數(shù)據(jù)信息省去列名稱 sql="select * from test.user" result="$($MYSQL -e "$sql")" dump_data=./data.user.txt >$dump_data echo -e "$result" > $dump_data #這里要額外注意,echo -e "$result" > $dump_data的時候一定要加上雙引號,不讓導出的數(shù)據(jù)會擠在一行 #下面是返回的測試數(shù)據(jù) 3 吳彥祖 32 5 王力宏 32 6 ab 32 7 黃曉明 33 8 anonymous 32</code>??? ??
<code>#先看看要導入的數(shù)據(jù)格式,三列,分別是id,名字,年齡(數(shù)據(jù)是隨便捏造的),放入data.user.txt 12 tf 23 13 米勒 24 14 西安電子科技大學 90 15 西安交大 90 16 北京大學 90 #OLF_IFS=$IFS #IFS="," #臨時設置默認分隔符為逗號 cat data.user.txt | while read id name age do sql="insert into test.user(id, name, age) values(${id}, '${name}', ${age});" $MYSQL -e "$sql" done</code>????
<code>+----+--------------------------+-----+ | id | name | age | +----+--------------------------+-----+ | 12 | tf | 23 | | 13 | 米勒 | 24 | | 14 | 西安電子科技大學 | 90 | | 15 | 西安交大 | 90 | | 16 | 北京大學 | 90 | +----+--------------------------+-----+</code>??? ????
<code>#先看看更新數(shù)據(jù)的格式,將左邊一列替換為右邊一列,只有左邊一列的刪除,下面數(shù)據(jù)放入update.user.txt tf twoFile 西安電子科技大學 西軍電 西安交大 西安交通大學 北京大學 cat update.user.txt | while read src dst do if [ ! -z "${src}" -a ! -z "${dst}" ] then sql="update test.user set name='${dst}' where name='${src}'" fi if [ ! -z "${src}" -a -z "${dst}" ] then sql="delete from test.user where name='${src}'" fi $MYSQL -e "$sql" done</code>?? ??:
<code>+----+--------------------------+-----+ | id | name | age | +----+--------------------------+-----+ | 12 | twoFile | 23 | | 13 | 米勒 | 24 | | 14 | 西軍電 | 90 | | 15 | 西安交通大學 | 90 | +----+--------------------------+-----+</code>
? ?? ???? ??? [? ??? ???? ??? ???? mysql? ??, ??, ??, ?? ?? ? ?? ??? ???? ?? PHP ????? ??? ?? ????? ??? ??? ????.luluyrt at 163 dot com

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

1. PHP ?? ?? ? ?? ?????? Laravel MySQL VUE/React ??? ? ?? ??? ???? ??? ?? ?? ??? ?? Laravel MySQL VUE/React ??? ? ?? ?????. 2. ???? ?? (REDIS), ?????? ???, CDN ? ??? ?? ???????. 3. ?? ???, CSRF ??, HTTPS, ???? ??? ? ?? ??? ??? ???????. 4. ? ??? ??, ?? ??, ??, ???, ?? ?? ? ?? ??? ??? ???? ? ? ??? ??? ?? ????.

PHP?? ?? ??? ???? ? ?? ?? ??? ????. 1. php.ini? ?? ??? ??; 2. ? ?? (? : Apache? Setenv ?? nginx? FastCGI_Param)? ??????. 3. PHP ?????? putenv () ??? ??????. ? ??? Php.ini? ????? ??? ???? ??? ???? ? ?? ??? ?? ???? ????? ???? Putenv ()? ?? ??? ?????. ?? ???? ?? ?? (? : php.ini ?? ? ?? ??)? ???? ????. ?? ?? ??? ??? ?? ??? ????? ???? ?? ????.

MySQL ?? ???? ???? ?? Terraform? ???? ???, Ansible Management ??, ?? ????? GIT ? ?? ? ?? ??? ???? ????. 1. Terraform? ???? ??, ??, ??? ?? ? AWSRD? ?? ??? ??? ?? MySQL ????? ?????. 2. AnsiblePlayBook? ???? ?????? ??? ??, ?? ?? ?? ?? ?? ??? ?????. 3. ?? ?? ??? GIT ??, ?? ?? ?? ? ?? ??? ?????. 4. ?? ?? ? ??? ??? ??? Vault ?? AnsibleVault? ???? ??? ???? ??? ?? ? ?? ?? ??? ??????.

??? ?? ???? ????? PHP? ?? ??, ??, ?? ? ?? ??? ??????? ?????? ???? ???? ?? ???? ???????. 2. ?? ???? ??? ??? ??? ?? ????????. ???, ?? ???, ?? ?? ?? ?? ??? ??; 3. ?? ?? ???? PHP?? ???? ??? ??? ???? ???? ?? ??? ??? ???? ?? ?? ??? ???? ?? ??? ?????. 4. ?? ??? ???, ??, F1 ? ? CTR, ???? ???? A/B ???? ?? ??? ?????. 5. ?? ??? ??? ?? ??, ??? ?? ??, ?? ?? ?? ? ??? ??? ?? ?? ? ? ????. 6. ?? ??? ???? ?? ? ?? ??, ??? ??, ?? ??? ? SQL ?? ???? ???? ?? ??? ? ??? ??? ?????.

SSL/TLS ??? MySQL ??? ??? ??? ?????? ????? ?? ??? ?? ??? ???? ?? ??? ? ???? SSL/TLS? ????? ?? ??? ???? ?? ?? ?? ??? ???? ? ????. 2. MySQL? SSL/TLS? ???? ??? ?????? ???? ?? ?? ???? ssl-ca, ssl-cert ? ssl-key ??? ???? ???? ?? ????? ?? ??? ???????. 3. ?????? ??? ? SSL? ???? ??? ?????? ???? ?? ? ? ?? ??? ???? ??; 4. SSL ???? ?? ???? ?? ???? ??? ?? ??, ??? ?? ?? ? ????? ?? ?? ??? ?????.

PHP? ??? ?? ??, ?????? ???? ? ?? AI ???? ???? ? ????? ??? ?? ????? ??? ? ??? ??? ??? ?????. 2.?? ??? ?? ?? ??? ????? ???????. ??? ??? ??? ???, PHP ??? ??? ? ?? ??? ???? ?? ?? ?? ??? ???? ??? OpenAI ?? DialogFlow? ?? ?? AI ???? ???? ???? ??? ????. 3. ?? ??? ???? ???? ???? ?? PHP? ?? MySQL ? ?? ??????? ?????. 4. ?? AI ???? guzzle? ???? HTTP ??? ??? Apikeys? ???? ???? ?? ?? ? ?? ??? ? ???????. 5. ?????? ????? ??, ???, ?? ?? ? ??? ???? ???????, ???? ????? ???? ?? ? ??? ???? ?? ???? ???????.

??? PHP ??? ??? ??? ?? ???? ??? ?? ????? ???????. Laravel? ?? ??? ???? ??? ? ? ???? ??? ??? ???? ?????? ?? ? ?? ?? ???? ?????. Symfony? ? ???? ??? ???? ?????. Codeigniter? ??? ??? ?? ??? ?? ??? ?? ????? ?????. 2. AI ??? ???? ????? ??? ??? ??, ???? ?? ?? (? : ???, ??, F1 ?), ??? ? ?? ?? ? ?? ??? ?? ???? ?? ??? ???? ???? ?? ??? ? ?? ???? ?? ?? ??? ????? ?? ???? ????? ?????? ??? ????? ???????. 3. ??? ?? ?? ????? ?? ??? ?????. AES? ?? ??? ???? ????? ?????.

PHP ????? ?? ??? ??? ? ??? ??? CI (Continuous Integration) ????? ???? ? ????. 1. DockerFile? ???? ?? ???, ?? ??, ??? ?? ? ?? ??? ???? PHP ??? ?????. 2. Gitlabci? ?? CI/CD ??? ???? .gitlab-ci.yml ??? ?? ??, ??? ? ?? ??? ???? ?? ??, ??? ? ??? ?????. 3. PHPUNIT? ?? ??? ??? ??? ???? ?? ?? ? ???? ???? ????????. 4. Kubernetes? ?? ?? ?? ??? ???? ?? .yaml ??? ?? ?? ??? ?????. 5. Dockerfile ??? ? ??? ??? ??????
