欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

2.11.1Mysql升級UpgradeMethods

1.升級方法

成都創(chuàng)新互聯(lián)公司服務(wù)項(xiàng)目包括吳川網(wǎng)站建設(shè)、吳川網(wǎng)站制作、吳川網(wǎng)頁制作以及吳川網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,吳川網(wǎng)站推廣取得了明顯的社會效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到吳川省份的部分城市,未來相信會繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

  1. In-Place Upgrade: (就地升級)Involves shutting down the old MySQL version, replacing the old MySQL binaries or packages with the new ones, restarting MySQL on the existing data directory, and runningmysql_upgrade.
  2. Logical Upgrade:(邏輯升級) Involves exporting existing data from the old MySQL version usingmysqldump, installing the new MySQL version, loading the dump file into the new MySQL version, and runningmysql_upgrade.

 

2.升級路徑

  1. 僅支持General Availability(GA)版本之間的升級
  2. 從5.6到5.7是支持的,升級的下一個版本之前建議升級到最新的版本,如先升級的5.6的最后一個版本,再升級的5.7
  3. 不支持跳版本升級,如從5.5到 5.7
  4. 小版本升級是支持的,如5.7.x到 5.7.y

Upgrade within a release series is supported

 

3.開始之前

  1. 備份,包含系統(tǒng)庫、系統(tǒng)表
  2. 查看不兼容的改變,seeFeatures Removed in MySQL 5.7.
  3. 查看Section 2.11.1.2, “Changes Affecting Upgrades to MySQL 5.7”. This section describes changes that may require action before or after upgrading.這部分描述了升級前后可能需要的執(zhí)行變化。
  1. 如果你使用了replication復(fù)制,查看Section 16.4.3, “Upgrading a Replication Setup”.
  1. 如果你使用了 InnoDB的 XA transactions,在升級之前運(yùn)行“XA RECOVER”來檢查未提交的Xa事務(wù),如果有結(jié)果返回,需要執(zhí)行XA COMMIT orXA ROLLBACK語句來提交或回滾Xa事務(wù)

 

 

In-Place Upgrade

To perform an in-place upgrade:

  1. Review the changes described inSection 2.11.1.2, “Changes Affecting Upgrades to MySQL 5.7” for steps to be performed before upgrading.
  2. Configure MySQL to perform a slow shutdown by settinginnodb_fast_shutdown to 0. For example:

 

mysql -u root -p --execute="SET GLOBALinnodb_fast_shutdown=0"

 

With a slow shutdown, InnoDB performs a full purge and change buffer merge before shutting down, which ensures that data files are fully prepared in case of file format differences between releases.

 

  1. Shut down the old MySQL server. For example:
    mysqladmin -u root -p shutdown

 

  1. Upgrade the MySQL binary installation or packages. If upgrading a binary installation, unpack the new MySQL binary distribution package. SeeObtain and Unpack the Distribution. For package-based installations, replace the old packages with the new ones.
    Note
    For supported Linux distributions, the preferred method for replacing the MySQL packages is to use the MySQL software repositories; seeSection 2.11.1.3, “Upgrading MySQL with the MySQL Yum Repository”,Section 2.11.1.4, “Upgrading MySQL with the MySQL APT Repository”, orUpgrading MySQL with the MySQL SLES Repository for instructions.

 

  1. Start the MySQL 5.7 server, using the existing data directory. For example:
    mysqld_safe --user=mysql --datadir=/path/to/existing-datadir

Run mysql_upgrade. For example:

mysql_upgrade -u root -p

 

  1. mysql_upgrade examines all tables in all databases for incompatibilities with the current version of MySQL.mysql_upgrade also upgrades the mysql system database so that you can take advantage of new privileges or capabilities.

 

Note
mysql_upgrade does not upgrade the contents of the help tables. For upgrade instructions, see Section 5.1.11, “Server-Side Help”.

 

  1. Shut down and restart the MySQL server to ensure that any changes made to the system tables take effect. For example:

mysqladmin -u root -p shutdown
mysqld_safe --user=mysql --datadir=/path/to/existing-datadir

 

Logical Upgrade

 

  1. Review the changes described inSection 2.11.1.2, “Changes Affecting Upgrades to MySQL 5.7” for steps to be performed before upgrading.
  2. Export your existing data from the previous MySQL version:
    mysqldump -u root -p
     --add-drop-table --routines --events
     --all-databases --force > data-for-upgrade.sql

 

Note
Use the--routines and--events options withmysqldump (as shown above) if your databases include stored programs. The--all-databases option includes all databases in the dump, including themysql database that holds the system tables.
Important
If you have tables that contain generated columns, use themysqldump utility provided with MySQL 5.7.9 or higher to create your dump files. Themysqldump utility provided in earlier releases uses incorrect syntax for generated column definitions (Bug #20769542). You can use theINFORMATION_SCHEMA.COLUMNS table to identify tables with generated columns.

 

  1. Shut down the old MySQL server. For example:
    mysqladmin -u root -p shutdown
  2. Install MySQL 5.7. For installation instructions, seeChapter 2,Installing and Upgrading MySQL.
  3. Initialize a new data directory, as described atSection 2.10.1, “Initializing the Data Directory”. For example:
    mysqld --initialize --datadir=/path/to/5.7-datadir

Copy the temporary'root'@'localhost' password displayed to your screen or written to your error log for later use.

  1. Start the MySQL 5.7 server, using the new data directory. For example:
    mysqld_safe --user=mysql --datadir=/path/to/5.7-datadir

 

  1. Reset theroot password:

shell> mysql -u root -p
Enter password: **** <- enter temporary root password

mysql> ALTER USER USER() IDENTIFIED BY 'your new password';

 

  1. Load the previously created dump file into the new MySQL server. For example:

mysql -u root -p--force < data-for-upgrade.sql

 

Note
It is not recommended to load a dump file when GTIDs are enabled on the server (gtid_mode=ON), if your dump file includes system tables.mysqldump issues DML instructions for the system tables which use the non-transactional MyISAM storage engine, and this combination is not permitted when GTIDs are enabled. Also be aware that loading a dump file from a server with GTIDs enabled, into another server with GTIDs enabled, causes different transaction identifiers to be generated.

 

  1. Runmysql_upgrade. For example:
    mysql_upgrade -u root -p

 

mysql_upgrade examines all tables in all databases for incompatibilities with the current version of MySQL.mysql_upgrade also upgrades themysql system database so that you can take advantage of new privileges or capabilities.
Note
mysql_upgrade does not upgrade the contents of the help tables. For upgrade instructions, seeSection 5.1.11, “Server-Side Help”.

  1. Shut down and restart the MySQL server to ensure that any changes made to the system tables take effect. For example:

mysqladmin -u root -p shutdown
mysqld_safe --user=mysql --datadir=/path/to/5.7-datadir

 

Upgrade Troubleshooting

 

  1. If problems occur, such as that the newmysqld server does not start, verify that you do not have an oldmy.cnf file from your previous installation. You can check this with the--print-defaults option (for example,mysqld --print-defaults). If this command displays anything other than the program name, you have an activemy.cnf file that affects server or client operation.
  2. If, after an upgrade, you experience problems with compiled client programs, such asCommands out of sync or unexpected core dumps, you probably have used old header or library files when compiling your programs. In this case, check the date for yourmysql.h file andlibmysqlclient.a library to verify that they are from the new MySQL distribution. If not, recompile your programs with the new headers and libraries. Recompilation might also be necessary for programs compiled against the shared client library if the library major version number has changed (for example, fromlibmysqlclient.so.15 tolibmysqlclient.so.16).
  3. If you have created a user-defined function (UDF) with a given name and upgrade MySQL to a version that implements a new built-in function with the same name, the UDF becomes inaccessible. To correct this, useDROP FUNCTION to drop the UDF, and then useCREATE FUNCTION to re-create the UDF with a different nonconflicting name. The same is true if the new version of MySQL implements a built-in function with the same name as an existing stored function. SeeSection 9.2.4, “Function Name Parsing and Resolution”, for the rules describing how the server interprets references to different kinds of functions.

分享名稱:2.11.1Mysql升級UpgradeMethods
標(biāo)題URL:http://chinadenli.net/article14/pddsge.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、用戶體驗(yàn)、網(wǎng)站設(shè)計(jì)網(wǎng)站建設(shè)、定制開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)