重装Windows系统Wamp Server后,如何将127_0_0_1.sql导入本地phpMyAdmin?
How to Import Your SQL File into phpMyAdmin After Reinstalling Wamp Server (Windows)
Hey there! Let me walk you through the step-by-step process to get your exported 127_0_0_1.sql file back into phpMyAdmin after reinstalling Wamp. It’s pretty straightforward—just follow these steps:
1. Ensure Wamp Server is running correctly
- Launch Wamp Server and wait for the system tray icon to turn green. If it stays orange, that means either Apache or MySQL failed to start. Double-check that no other programs are using ports 80 or 3306 (like Skype or another local web server) and restart Wamp.
2. Open phpMyAdmin
- Right-click the Wamp tray icon, hover over phpMyAdmin in the dropdown menu, and click it. This will launch phpMyAdmin in your default web browser.
3. Create a target database (if required)
Since reinstalling Wamp resets your local databases, you’ll need a destination for your imported data:
- On the phpMyAdmin homepage, find the New option at the top left.
- Enter a database name (ideally the same as your original database to avoid connection/path issues later).
- Select a character set (we recommend
utf8mb4_unicode_ci—it’s widely compatible and supports special characters/emojis). - Click Create to finalize the database.
4. Navigate to the target database
- Once the database is created, click its name in the left-hand sidebar to enter its management page.
5. Import your SQL file
- At the top of the page, click the Import tab.
- In the "File to import" section, click Choose File and browse to your
127_0_0_1.sqlfile on your computer. - The "Format" dropdown should automatically detect
SQL—no need to adjust this. - Double-check the "Character set of the file" setting (match it to your export’s charset;
utf8mb4orutf8works for most cases). - Scroll to the bottom of the page and click Execute.
6. Verify the import
- After the import completes, you’ll see a success message. Check the left-hand sidebar—your database tables should now appear under the target database name. You can click a table to confirm the data is intact.
Troubleshooting Tips
- If you get an error about the file being too large:
- Right-click the Wamp tray icon, go to PHP > php.ini.
- Locate the lines for
upload_max_filesizeandpost_max_size, and increase their values (e.g., set both to64Mor higher depending on your file size). - Save the file and restart Wamp Server, then try importing again.
- If your SQL file already includes a
CREATE DATABASEstatement, you can skip step 3—just go straight to the Import tab, select the file, and execute it; phpMyAdmin will create the database automatically.
内容的提问来源于stack exchange,提问作者Hema
相关产品推荐
相关产品推荐

