mysql二進位安裝,升級,多實例部署

来源:http://www.cnblogs.com/Aiapple/archive/2016/08/06/5745045.html
-Advertisement-
Play Games

目標 理解線上部署考慮的因素 學會編譯安裝以及二進位安裝mysql 學會升級mysql 學會多實例部署mysql資料庫 學會合理部署mysql線上庫 考慮因素: 版本選擇,5.1,5.5還是5.6? 分支選擇,官方社區版?percona server?mariadb? 推薦官方版,簡單易上手 安裝方 ...


目標
  • 理解線上部署考慮的因素
  • 學會編譯安裝以及二進位安裝mysql
  • 學會升級mysql
  • 學會多實例部署mysql資料庫
  • 學會合理部署mysql線上庫
  考慮因素:
  • 版本選擇,5.1,5.5還是5.6?
  • 分支選擇,官方社區版?percona server?mariadb?
    • 推薦官方版,簡單易上手
  • 安裝方式,包安裝?二進位包安裝?源碼安裝?
    • 線上推薦二進位包安裝
  • 路徑配置,參數配置(儘量模板化,標準化)
  • 一個實例多個庫,or多個實例單個庫?
  二進位安裝mysql
 
  1. 下載軟體安裝包
  2. 解壓放到指定目錄(比如/usr/local)並將mysql目錄放到PATH中
  3. 初始化實例,編輯配置文件 並啟動
  4. 賬號安全設置
    1)下載 mysql-5.5.50-linux2.6-i686   2)解壓到指定目錄,並將mysql目錄放到PATH中  
#tar -zxf mysql-5.5.50-linux2.6-i686.tar.gz
#mv mysql-5.5.50-linux2.6-i686  /usr/local/
#cd /usr/local
#mv mysql-5.5.50-linux2.6-i686 mysql55
#cd mysql55/bin
#export PATH=/usr/local/mysql55/bin:$PATH

 

3)初始化實例 使用腳本mysql_install_db  
#mkdir -p /tmp/mysqldata/node1
#/usr/local/mysql55/script/mysql_install_db --user=mysql --basedir=/usr/local/mysql55 --datadir=/tmp/mysqldata/node1
#cd /tmp/mysqldata/node1

 

出現問題1 沒有libaio.so.1庫
/tmp/mysql55/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

 

解決:查詢libaio庫並按照libaio.so.1 查詢
aiapple@aiapple:/tmp$ sudo apt-cache search libaio
libaio-dev - Linux kernel AIO access library - development files
libaio1 - Linux kernel AIO access library - shared library
libaio1-dbg - Linux kernel AIO access library - debugging symbols
安裝
aiapple@aiapple:/tmp$ sudo apt-get install libaio1

 

初始化成功:
aiapple@aiapple:/usr/local/mysql/data$ ls -l /tmp/mysqldata/node1/
total 12
drwx------ 2 aiapple aiapple 4096  7月 27 21:27 mysql
drwx------ 2 aiapple aiapple 4096  7月 27 21:27 performance_schema
drwx------ 2 aiapple aiapple 4096  7月 27 21:25 test

 

拷貝配置文件:support-files中拷貝my-medium.cnf
cp /usr/local/mysql56/support-files/my-medium.cnf /tmp/mysqldata

 

3)使用mysqld_safe腳本,啟動
/usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf &

 

問題2:沒有/usr/local/mysql/data 目錄
aiapple@aiapple:/usr/local/mysql55/support-files$ /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf &
[1] 3349
aiapple@aiapple:/usr/local/mysql55/support-files$ 160727 21:33:26 mysqld_safe Logging to '/usr/local/mysql/data/aiapple.err'.
touch: cannot touch ‘/usr/local/mysql/data/aiapple.err’: No such file or directory
chmod: cannot access ‘/usr/local/mysql/data/aiapple.err’: No such file or directory
160727 21:33:26 mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information
/usr/local/mysql55/bin/mysqld_safe: 128: /usr/local/mysql55/bin/mysqld_safe: cannot create /usr/local/mysql/data/aiapple.err: Directory nonexistent
^C
[1]+  Exit 1                  /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf
View Code

 

解決:創建目錄並賦權
aiapple@aiapple:/usr/local$ sudo mkdir -p mysql/data
aiapple@aiapple:/usr/local/mysql$ sudo chown -R aiapple .
aiapple@aiapple:/usr/local/mysql$ sudo chgrp -R aiapple .

 

問題3:不存/usr/local/mysql/bin/mysqld 文件
aiapple@aiapple:/usr/local/mysql$ /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf &
[1] 3773
aiapple@aiapple:/usr/local/mysql$ 160727 21:37:32 mysqld_safe Logging to '/usr/local/mysql/data/aiapple.err'.
160727 21:37:32 mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information
^C
[1]+  Exit 1                  /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf
View Code

 

懷疑 Ubuntu定死了basedir 在/usr/local/mysql 下 解決:拷貝mysql55中內容到該目錄中
aiapple@aiapple:/usr/local/mysql$ cp -ar ../mysql55/* .

 

問題4:mysqld從 /usr/local/mysql/data中啟動庫文件;
aiapple@aiapple:/usr/local/mysql$ /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf &
[1] 3983
aiapple@aiapple:/usr/local/mysql$ 160727 21:39:05 mysqld_safe Logging to '/usr/local/mysql/data/aiapple.err'.
160727 21:39:05 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
160727 21:39:07 mysqld_safe mysqld from pid file /usr/local/mysql/data/aiapple.pid ended
 
[1]+  Done                    /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf
且mysqld沒有啟動
aiapple@aiapple:~$ ps -ef | grep mysqld
aiapple   2129  2097  0 19:35 pts/2    00:00:00 grep --color=auto mysqld
View Code

 

  查看aiapple.err:需要的一些表不在/usr/local/mysql/data
160727 21:41:59 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
160727 21:41:59 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.50-log) starting as process 4500 ...
160727 21:41:59 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
160727 21:41:59 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
160727 21:41:59 InnoDB: The InnoDB memory heap is disabled
160727 21:41:59 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160727 21:41:59 InnoDB: Compressed tables use zlib 1.2.3
160727 21:41:59 InnoDB: Using Linux native AIO
160727 21:41:59 InnoDB: Initializing buffer pool, size = 128.0M
160727 21:41:59 InnoDB: Completed initialization of buffer pool
160727 21:41:59 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 48941
160727 21:41:59  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1595675
160727 21:41:59  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
160727 21:41:59  InnoDB: Waiting for the background threads to start
160727 21:42:00 InnoDB: 5.5.50 started; log sequence number 1595675
160727 21:42:00 [Note] Recovering after a crash using mysql-bin
160727 21:42:00 [Note] Starting crash recovery...
160727 21:42:00 [Note] Crash recovery finished.
160727 21:42:00 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160727 21:42:00 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160727 21:42:00 [Note] Server socket created on IP: '0.0.0.0'.
160727 21:42:00 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
160727 21:42:00 mysqld_safe mysqld from pid file /usr/local/mysql/data/aiapple.pid ended
View Code   解決:將原初始化的datadir目錄中所有拷貝過去
aiapple@aiapple:/usr/local/mysql/data$ rm -rf test/
aiapple@aiapple:/usr/local/mysql/data$ cp -ar /tmp/mysqldata/node1/* .
  成功安裝:
aiapple@aiapple:/usr/local/mysql/data$ ps -ef | grep mysqld
aiapple   4536  2146  0 21:43 pts/0    00:00:00 /bin/sh /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf
aiapple   4773  4536  1 21:43 pts/0    00:00:00 /usr/local/mysql/bin/mysqld --defaults-file=/tmp/mysqldata/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/aiapple.err --pid-file=/usr/local/mysql/data/aiapple.pid --socket=/tmp/mysql.sock --port=3306
aiapple   4792  2097  0 21:44 pts/2    00:00:00 grep --color=auto mysqld
View Code

 

疑問: 不知是Ubuntu指定了basedir=/usr/local/mysql,datadir=/usr/local/mysql/data;還是最開始的初始化沒有管用,還是有什麼配置沒有寫在配置文件中。   當然是沒有寫在配置文件中了,可以查看一下my-medium.cnf內容
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock
 
# Here follows entries for some specific programs
 
# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
View Code 沒有相關目錄的配置;   增加啟動配置參考:mysqld_safe — MySQL Server Startup Script   在my.cnf 增加一下配置
my.cnf
port            = 3306
socket          = /tmp/mysqldata/node1/mysql.sock
 
[mysqld_safe]
user=aiapple
 
# Here follows entries for some specific programs
 
# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysqldata/node1/mysql.sock
pid-file        = /tmp/mysqldata/node1/mysqld.pid
basedir         = /usr/local/mysql55
datadir         = /tmp/mysqldata/node1
innodb_data_home_dir = /tmp/mysqldata/node1
innodb_log_group_home_dir =/tmp/mysqldata/node1
tmpdir          = /tmp/mysqldata/node1
log-error       = /tmp/mysqldata/node1/aiapple.log
log-bin         = /tmp/mysqldata/node1/mysql-bin.log
 
View Code

 

重新啟動 問題一:配置文件許可權太大
aiapple@aiapple:/usr/local/mysql$ /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf &
Warning: World-writable config file '/tmp/mysqldata/my.cnf' is ignored
解決:降權
aiapple@aiapple:sudo chmod 600 /tmp/mysqldata/my.cnf

 

問題二:bin目錄未指定
aiapple@aiapple:/usr/local/mysql$ /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf &
160806 16:07:29 mysqld_safe The file /usr/local/mysql/bin/mysqld does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows: ./bin/mysqld_safe&

 

解決:在配置文件中通過ledir指定bin目錄
#my.cnf增加
ledir  =  /usr/local/mysql55

 

問題三:aiapple.err報錯,插件被禁止
160806 16:48:46 [Note] Plugin 'FEDERATED' is disabled.
160806 16:48:46 InnoDB: The InnoDB memory heap is disabled
160806 16:48:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160806 16:48:46 InnoDB: Compressed tables use zlib 1.2.3
160806 16:48:46 InnoDB: Using Linux native AIO
160806 16:48:46 InnoDB: Initializing buffer pool, size = 128.0M
View Code 解決:在配置文件中啟用,nice=0
#my.cnf增加
nice  =  0

 

4)賬號安全設置   #刪除空用戶
mysql -uroot --socket=/tmp/mysql.sock
select user,host,password from mysql.user;
delete from mysql.user where user='';
delete from mysql.user where host<>'localhost';
 
mysql> select user,host,password from mysql.user;
+------+-----------+----------+
| user | host      | password |
+------+-----------+----------+
| root | localhost |          |
+------+-----------+----------+
1 row in set (0.00 sec)

 

#設置root密碼
mysql> set password for root@'localhost'=password('000000');
Query OK, 0 rows affected (0.00 sec)
  #使設置生效
flush privileges;
  #刪除test庫   看看只讀許可權的test用戶能用test庫做什麼
創建test用戶
#mysql -uroot -p123456--socket=/tmp/mysql.sock
grant select on *.* to test@'localhost' identified by '123';
 
使用test用戶,在test庫中建表
#mysql -utest -p123 --socket=/tmp/mysql.sock
use test
create table t1(id int);
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| t1             |
+----------------+
1 row in set (0.01 sec)

 

刪除test庫
mysql> drop database test;
Query OK, 1 row affected (0.01 sec)

 

      mysql升級
  從5.5升級到5.6
  1. 下載mysql5.6安裝包並配置mysql5.6安裝包安裝路徑
  2. 關閉mysql5.5的實例,修改部分參數,使用mysql5.6軟體啟動
  3. 執行mysql5.6路徑下mysql_upgrade腳本
  4. 驗證是否成功升級
MySQL升級   1)關閉mysql 查看mysql是否啟動
aiapple@aiapple:/tmp/mysqldata$ ps -ef | grep mysqld
aiapple   4931  2146  0 22:32 pts/0    00:00:00 /bin/sh /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf
aiapple   5168  4931  0 22:32 pts/0    00:00:00 /usr/local/mysql/bin/mysqld --defaults-file=/tmp/mysqldata/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/aiapple.err --pid-file=/usr/local/mysql/data/aiapple.pid --socket=/tmp/mysql.sock --port=3306
aiapple   5187  4889  0 22:33 pts/13   00:00:00 grep --color=auto mysqld

 

使用mysqladmin工具關閉mysql服務
aiapple@aiapple:/usr/local/mysql$ mysqladmin -uroot --socket=/tmp/mysql.sock shutdown -p
Enter password:
160727 22:28:46 mysqld_safe mysqld from pid file /usr/local/mysql/data/aiapple.pid ended
[1]+  Done                    /usr/local/mysql55/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf  (wd: /usr/local/mysql/data)
(wd now: /usr/local/mysql)

 

檢查是否關閉
aiapple@aiapple:/usr/local/mysql$ ps -ef | grep mysqld
aiapple   4918  2146  0 22:28 pts/0    00:00:00 grep --color=auto mysqld

 

2)更改my.cnf
#vim my.cnf(把55目錄都改成56的)

 

3)使用mysql5.6啟動軟體; #使用5.6拉起實例
aiapple@aiapple:/tmp/mysqldata$ /usr/local/mysql56/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf &
[1] 9121
aiapple@aiapple:/tmp/mysqldata$ 160806 21:29:11 mysqld_safe Logging to '/tmp/mysqldata/node1/aiapple.log'.
160806 21:29:11 mysqld_safe Starting mysqld daemon with databases from /tmp/mysqldata/node1

 

#查看mysqld進程有沒有起來
aiapple@aiapple:/tmp/mysqldata$ ps -ef | grep mysql
aiapple   9121  8547  0 21:29 pts/2    00:00:00 /bin/sh /usr/local/mysql56/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf
aiapple   9489  9121  0 21:29 pts/2    00:00:00 /usr/local/mysql56/bin/mysqld --defaults-file=/tmp/mysqldata/my.cnf --basedir=/usr/local/mysql56 --datadir=/tmp/mysqldata/node1 --plugin-dir=/usr/local/mysql56/lib/plugin --log-error=/tmp/mysqldata/node1/aiapple.log --pid-file=/tmp/mysqldata/node1/mysqld.pid --socket=/tmp/mysqldata/node1/mysql.sock --port=3306
aiapple   9564  8547  0 21:35 pts/2    00:00:00 grep --color=auto mysql

 

#登陸後查看mysql狀態
mysql> status
--------------
mysql  Ver 14.14 Distrib 5.6.32, for linux-glibc2.5 (x86_64) using  EditLine wrapper
 
Connection id:        3
Current database:   
Current user:        root@localhost
SSL:            Not in use
Current pager:        stdout
Using outfile:        ''
Using delimiter:    ;
Server version:        5.6.32-log MySQL Community Server (GPL)
Protocol version:    10
Connection:        Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:        /tmp/mysqldata/node1/mysql.sock
Uptime:            7 min 27 sec
 
Threads: 1  Questions: 5  Slow queries: 0  Opens: 32  Flush tables: 1  Open tables: 25  Queries per second avg: 0.011
--------------
 
View Code

 

4)升級庫mysql_upgrade
aiapple@aiapple:/tmp/mysqldata$ /usr/local/mysql56/bin/mysql_upgrade -uroot --socket=/tmp/mysqldata/node1/mysql.sock -p
Enter password:
Looking for 'mysql' as: /usr/local/mysql56/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql56/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--socket=/tmp/mysqldata/node1/mysql.sock'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--socket=/tmp/mysqldata/node1/mysql.sock'
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.servers                                      OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--socket=/tmp/mysqldata/node1/mysql.sock'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--socket=/tmp/mysqldata/node1/mysql.sock'
Warning: Using a password on the command line interface can be insecure.
OK
View Code

 

#驗證庫有沒有升級成功
aiapple@aiapple:/tmp/mysqldata$ /usr/local/mysql56/bin/mysql_upgrade -uroot --socket=/tmp/mysqldata/node1/mysql.sock -p
Enter password:
Looking for 'mysql' as: /usr/local/mysql56/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql56/bin/mysqlcheck
This installation of MySQL is already upgraded to 5.6.32, use --force if you still need to run mysql_upgrade
  mysql多實例安裝
 
  1. 部署好mysql軟體
  2. 編輯多個配置文件,初始化多個實例
  3. 啟動mysql實例
  為啥多實例部署?
  • 充分利用系統資源
  • 資源隔離
  • 業務,模塊隔離
 多實例安裝
#mkdir -p /mysqldata/node3

 

a) 初始化實例 使用腳本mysql_install_db
aiapple@aiapple:/tmp/mysqldata/node1$ /usr/local/mysql56/scripts/mysql_install_db --user=aiapple --basedir=/usr/local/mysql56 --datadir=/tmp/mysqldata/node3
#查看
aiapple@aiapple:/tmp/mysqldata/node1$ ls ../node3
ibdata1  ib_logfile0  ib_logfile1  mysql  performance_schema  test

 

b) 給node3配置文件
cp my2.cnf my3.cnf
vim my3.cnf(修改相關參數)
[client]
#password       = your_password
port            = 3308
socket          = /tmp/mysqldata/node3/mysql.sock
 
[mysqld_safe]
user=aiapple
ledir = /usr/local/mysql56/bin
#ledir = /usr/local/mysql55/bin
nice = 0
# Here follows entries for some specific programs
 
# The MySQL server
[mysqld]
port            = 3308
socket          = /tmp/mysqldata/node3/mysql.sock
pid-file        = /tmp/mysqldata/node3/mysqld.pid
basedir         = /usr/local/mysql56
#basedir         = /usr/local/mysql55
datadir         = /tmp/mysqldata/node3
innodb_data_home_dir      = /tmp/mysqldata/node3
innodb_log_group_home_dir = /tmp/mysqldata/node3
tmpdir          = /tmp/mysqldata/node3
log-error       = /tmp/mysqldata/node3/aiapple.log
log-bin         = /tmp/mysqldata/node3/mysql-bin.log
View Code

 

c) 使用mysqld_safe,及my3.cnf拉起實例
aiapple@aiapple:/tmp/mysqldata/node3$ /usr/local/mysql56/bin/mysqld_safe --defaults-file=/tmp/mysqldata/node3/my3.cnf &
[2] 9861
aiapple@aiapple:/tmp/mysqldata/node3$ 160806 22:03:17 mysqld_safe Logging to '/tmp/mysqldata/node3/aiapple.log'.
160806 22:03:17 mysqld_safe Starting mysqld daemon with databases from /tmp/mysqldata/node3

 

d)查看
aiapple@aiapple:/tmp/mysqldata/node3$ ps -ef | grep mysqld
aiapple   9121  8547  0 21:29 pts/2    00:00:00 /bin/sh /usr/local/mysql56/bin/mysqld_safe --defaults-file=/tmp/mysqldata/my.cnf
aiapple   9489  9121  0 21:29 pts/2    00:00:02 /usr/local/mysql56/bin/mysqld --defaults-file=/tmp/mysqldata/my.cnf --basedir=/usr/local/mysql56 --datadir=/tmp/mysqldata/node1 --plugin-dir=/usr/local/mysql56/lib/plugin --log-error=/tmp/mysqldata/node1/aiapple.log --pid-file=/tmp/mysqldata/node1/mysqld.pid --socket=/tmp/mysqldata/node1/mysql.sock --port=3306
aiapple   9861  8547  	   

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • rt,最近搞一個高清圖傳,本著自(bu)主(mai)創(da)新(jiang)的原則,打算利用手中的iPad當作輔助飛行屏幕,USB傳輸數據。再說某疆圖傳7999(還只支持自家雲台錄像拍照),哪是我這等小學生消費得起的??? 現在剛繞明白OFDM正交子載波序列,又被接收端移動設備繞進去了。本來只考慮 ...
  • 常用的設計模式(一)代理模式應用場景:當一個類的某些功能需要由別的類來實現,但是又不確定具體會是哪個類實現。優勢:解耦合敏捷原則:開放-封閉原則實例:tableview的 數據源delegate,通過和protocol的配合,完成委托訴求。列表row個數delegate自定義的delegate (二 ...
  • 電腦控制Android設備的軟體,Total Control。 ...
  • 聽說之後AFHttpWorking版本可能會影響到蘋果的審核,今天下了最新版本的AFHttpWorking,並且做了簡單的封裝,我這裡是通過cocoapods下載了兩個工具 1=AFHttpWorking 2=JSONKit 為什麼要下jsonkit勒,以前json解析都使用touchjson,偶然 ...
  • Handler機制的原理 Android 的 Handler 機制(也有人叫消息機制)目的是為了跨線程通信,也就是多線程通信。之所以需 要跨線程通信是因為在 Android 中主線程通常只負責 UI 的創建和修改,子線程負責網路訪問和耗時操作, 因此,主線程和子線程需要經常配合使用才能完成整個 An ...
  • 佈局 selector 第一種方式 第二種方式 ...
  • 一般我們可以使用sql server自帶的性能分析追蹤工具sql profiler分析資料庫設計所產生問題的來源,進行有針對性的處理。但我們也可以通過自己寫SQL語句來有針對性的進行性能方面的查詢。通常會用到如下三個系統視圖:sys.sysprocesses ,dm_exec_sessions ,d ...
  • 下麵和大家分享一個比較經典的場景,資料庫的面試題目,主要的表是學生、課程、成績、教師四張表,本示例的特點是有模擬數據,加深理解和印象,答案主要基於Oracle來實現的 1、四張表分別為: 2、題目要求 3、在資料庫建表 /* */ /* CREATE TABLE */ /* */ --學生表 CRE ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...