{"id":1992,"date":"2024-09-23T19:17:02","date_gmt":"2024-09-23T11:17:02","guid":{"rendered":"https:\/\/www.ruianding.com\/blog\/?p=1992"},"modified":"2024-10-21T17:45:54","modified_gmt":"2024-10-21T09:45:54","slug":"website-migration-003-mysql-migration-for-wordpress","status":"publish","type":"post","link":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/","title":{"rendered":"Website Migration &#8211; Part 3: MySQL Migration for WordPress"},"content":{"rendered":"\n<p>In this post, I\u2019ll walk through the process of migrating my WordPress database from a Windows server to a Linux server, along with setting up MySQL on the Linux server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Backing Up the Existing Database on Windows<\/h2>\n\n\n\n<p>Before migrating, I needed to <strong>backup the WordPress database<\/strong> from the Windows server.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Exporting MySQL Database<\/strong><\/h4>\n\n\n\n<p>I used the <strong>MySQL command line<\/strong> to export the database. First, navigate to the MySQL installation directory:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd \"C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin\"<\/pre>\n\n\n\n<p>Then, run the following command to export the database:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">.\\mysqldump.exe -u ruiand -p ruianweb > C:\\ruianweb_backup.sql<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1428\" height=\"86\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png\" alt=\"\" class=\"wp-image-2006\" style=\"width:765px;height:auto\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Transferring the Backup File to the Linux Server<\/strong><\/h4>\n\n\n\n<p>Using <strong>SCP<\/strong>, I transferred the backup file from the Windows server to the Linux server:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">scp C:\\ruianweb_backup.sql root@{ipaddress}:\/data\/sqlbackup\/<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"90\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-24.png\" alt=\"\" class=\"wp-image-2007\" style=\"width:814px;height:auto\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. Configuring MySQL on the Linux Server<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Logging into MySQL<\/strong><\/h4>\n\n\n\n<p>After installing MySQL on the Linux server, I logged in using the root account:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo mysql -u root -p<\/pre>\n\n\n\n<p>Since I hadn&#8217;t set a password for the <strong>root<\/strong> user earlier, I configured it immediately:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';\nFLUSH PRIVILEGES;<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Creating a New Database<\/strong><\/h4>\n\n\n\n<p>I created a new database for WordPress:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CREATE DATABASE ruianweb;<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Creating a User and Granting Permissions<\/strong><\/h4>\n\n\n\n<p>Next, I created the <strong><code>ruiand<\/code><\/strong> user (to match the WordPress configuration) and granted all privileges on the new database:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CREATE USER 'ruiand'@'localhost' IDENTIFIED BY '&lt;my_password>';\nGRANT ALL PRIVILEGES ON ruianweb.* TO 'ruiand'@'localhost';\nFLUSH PRIVILEGES;<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Exiting MySQL<\/strong><\/h4>\n\n\n\n<p>After the setup was done, I exited the MySQL console:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">EXIT;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Importing the Database Backup<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Importing the Database<\/strong><\/h4>\n\n\n\n<p>I tried importing the database backup on the Linux server:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mysql -u ruiand -p ruianweb &lt; \/data\/sqlbackup\/ruianweb_backup.sql<\/pre>\n\n\n\n<p>Unfortunately, I encountered the following error:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1166\" height=\"174\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-25.png\" alt=\"\" class=\"wp-image-2009\" style=\"width:509px;height:auto\"\/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ERROR: ASCII '\\0' appeared in the statement...<\/pre>\n\n\n\n<p>To fix this, I added the <code>--binary-mode=1<\/code> option:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mysql --binary-mode=1 -u ruiand -p ruianweb &lt; \/data\/sqlbackup\/ruianweb_backup.sql<\/pre>\n\n\n\n<p>However, I still faced the same issue. Suspecting a <strong>character set<\/strong> problem (as my blog contains Chinese text), I re-exported the database using UTF-8 encoding:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mysqldump --default-character-set=utf8 -u ruiand -p ruianweb > ruianweb_backup.sql<\/pre>\n\n\n\n<p>Despite this, the error persisted. Further investigation revealed that the backup file was in <strong>UTF-16<\/strong> encoding. I used <code>iconv<\/code> to convert it to <strong>UTF-8<\/strong>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">iconv -f UTF-16 -t UTF-8 \/data\/sqlbackup\/ruianweb_backup.sql -o \/data\/sqlbackup\/ruianweb_backup_utf8.sql<\/pre>\n\n\n\n<p>But the import still failed with syntax errors. At this point, I suspected the issue was due to <strong>cross-platform differences<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Using MySQL Workbench for Backup<\/h2>\n\n\n\n<p>Instead of using <code>mysqldump<\/code>, I switched to <strong>MySQL Workbench<\/strong> for a graphical backup:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Backing Up the Database<\/strong><\/h4>\n\n\n\n<p>a. Open <strong>MySQL Workbench<\/strong> and connect to the database.<\/p>\n\n\n\n<p>b. Go to <strong>Data Export<\/strong>, select the <strong>ruianweb<\/strong> database, and export it as an SQL file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1538\" height=\"1012\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-26.png\" alt=\"\" class=\"wp-image-2010\" style=\"width:648px;height:auto\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1578\" height=\"824\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-27.png\" alt=\"\" class=\"wp-image-2011\" style=\"width:636px;height:auto\"\/><\/figure>\n\n\n\n<p>c. Ensure you select <strong>Export to self-contained file<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1858\" height=\"1244\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-28.png\" alt=\"\" class=\"wp-image-2013\" style=\"width:638px;height:auto\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Transferring and Importing<\/strong><\/h4>\n\n\n\n<p>I then used SCP to transfer the new backup file to the Linux server and successfully imported it without any errors.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1136\" height=\"154\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-29.png\" alt=\"\" class=\"wp-image-2015\" style=\"width:612px;height:auto\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">5. Verifying the Database Connection<\/h2>\n\n\n\n<p>After importing the database, I verified that WordPress could connect to the new MySQL database.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Updating wp-config.php<\/strong><\/h4>\n\n\n\n<p>I ensured that the database settings in WordPress were correctly configured:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">define( 'DB_NAME', 'ruianweb' );\ndefine( 'DB_USER', 'ruiand' );\ndefine( 'DB_PASSWORD', '{password}' );\ndefine( 'DB_HOST', 'localhost' );<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Restarting Apache and Testing<\/strong><\/h4>\n\n\n\n<p>Finally, I restarted Apache:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart apache2<\/pre>\n\n\n\n<p>I then accessed <a href=\"https:\/\/www.ruianding.com\/blog\"><strong>https:\/\/www.ruianding.com\/blog<\/strong><\/a> to confirm that everything was running smoothly.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<p>This post covered the steps I took to successfully migrate my WordPress database to the Linux server, along with troubleshooting key issues during the migration process.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, I\u2019ll walk through the process of migrating my WordPress database from a Windows server to a Linux server, along with setting up MySQL on the Linux server. 1. Backing Up the Existing Database on Windows Before migrating, I needed to backup the WordPress database from the Windows server. Exporting MySQL Database I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[58],"tags":[59],"class_list":["post-1992","post","type-post","status-publish","format-standard","hentry","category-siteandblogmigration","tag-migration"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Website Migration - Part 3: MySQL Migration for WordPress - \u6781\u7b80IT\uff5cSimpleIT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Website Migration - Part 3: MySQL Migration for WordPress - \u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"og:description\" content=\"In this post, I\u2019ll walk through the process of migrating my WordPress database from a Windows server to a Linux server, along with setting up MySQL on the Linux server. 1. Backing Up the Existing Database on Windows Before migrating, I needed to backup the WordPress database from the Windows server. Exporting MySQL Database I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-23T11:17:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-21T09:45:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1428\" \/>\n\t<meta property=\"og:image:height\" content=\"86\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ruian Ding\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ruian Ding\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/\"},\"author\":{\"name\":\"Ruian Ding\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"headline\":\"Website Migration &#8211; Part 3: MySQL Migration for WordPress\",\"datePublished\":\"2024-09-23T11:17:02+00:00\",\"dateModified\":\"2024-10-21T09:45:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/\"},\"wordCount\":455,\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png\",\"keywords\":[\"MIGRATION\"],\"articleSection\":[\"SiteAndBlogMigration\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/\",\"name\":\"Website Migration - Part 3: MySQL Migration for WordPress - \u6781\u7b80IT\uff5cSimpleIT\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png\",\"datePublished\":\"2024-09-23T11:17:02+00:00\",\"dateModified\":\"2024-10-21T09:45:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png\",\"width\":1428,\"height\":86},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ruianding.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Migration &#8211; Part 3: MySQL Migration for WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\",\"url\":\"https:\/\/www.ruianding.com\/blog\/\",\"name\":\"Ruian's Tech Troubleshooting Toolbox\",\"description\":\"Debug the World.\",\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"alternateName\":\"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\",\"name\":\"Ruian Ding\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"width\":284,\"height\":284,\"caption\":\"Ruian Ding\"},\"logo\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.\",\"sameAs\":[\"https:\/\/www.ruianding.com\"],\"url\":\"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Website Migration - Part 3: MySQL Migration for WordPress - \u6781\u7b80IT\uff5cSimpleIT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"Website Migration - Part 3: MySQL Migration for WordPress - \u6781\u7b80IT\uff5cSimpleIT","og_description":"In this post, I\u2019ll walk through the process of migrating my WordPress database from a Windows server to a Linux server, along with setting up MySQL on the Linux server. 1. Backing Up the Existing Database on Windows Before migrating, I needed to backup the WordPress database from the Windows server. Exporting MySQL Database I [&hellip;]","og_url":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/","og_site_name":"\u6781\u7b80IT\uff5cSimpleIT","article_published_time":"2024-09-23T11:17:02+00:00","article_modified_time":"2024-10-21T09:45:54+00:00","og_image":[{"width":1428,"height":86,"url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png","type":"image\/png"}],"author":"Ruian Ding","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ruian Ding","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#article","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/"},"author":{"name":"Ruian Ding","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"headline":"Website Migration &#8211; Part 3: MySQL Migration for WordPress","datePublished":"2024-09-23T11:17:02+00:00","dateModified":"2024-10-21T09:45:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/"},"wordCount":455,"publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png","keywords":["MIGRATION"],"articleSection":["SiteAndBlogMigration"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/","url":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/","name":"Website Migration - Part 3: MySQL Migration for WordPress - \u6781\u7b80IT\uff5cSimpleIT","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png","datePublished":"2024-09-23T11:17:02+00:00","dateModified":"2024-10-21T09:45:54+00:00","breadcrumb":{"@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#primaryimage","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2024\/09\/image-23.png","width":1428,"height":86},{"@type":"BreadcrumbList","@id":"https:\/\/www.ruianding.com\/blog\/website-migration-003-mysql-migration-for-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ruianding.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Migration &#8211; Part 3: MySQL Migration for WordPress"}]},{"@type":"WebSite","@id":"https:\/\/www.ruianding.com\/blog\/#website","url":"https:\/\/www.ruianding.com\/blog\/","name":"Ruian's Tech Troubleshooting Toolbox","description":"Debug the World.","publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"alternateName":"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b","name":"Ruian Ding","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","width":284,"height":284,"caption":"Ruian Ding"},"logo":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/"},"description":"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.","sameAs":["https:\/\/www.ruianding.com"],"url":"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/1992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/comments?post=1992"}],"version-history":[{"count":19,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/1992\/revisions"}],"predecessor-version":[{"id":2110,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/1992\/revisions\/2110"}],"wp:attachment":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/media?parent=1992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/categories?post=1992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/tags?post=1992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}