How to Fix Error Code 1130 When Importing Excel Data into Database
Question details
The user needs to resolve an authorization connection error that blocks the import of an Excel table into a database server.

- Product
- Excel, SQL Server, MySQL
- Device & OS
- not provided
- Scenario
- Importing a large Excel table into a destination database server (like SQL Server or MySQL) using the Import and Export Wizard.
- Observed behavior
- The system throws Error Code 1130, indicating that the connection host is not authorized or allowed to connect to the database server.
Ensure you have administrative privileges to both your local machine and the destination database server (SQL Server or MySQL) to modify connection permissions and firewall settings.
Grant Host Connection Permissions on the Database Server
Use this solution to ensure your specific user account is authorized to connect to the database from your client computer's IP address, which is the most common cause of Error 1130.
Error 1130 frequently originates from MySQL policies that reject remote connections from unauthorized IP addresses. You must explicitly grant access to the host machine attempting the import.
Open your Import and Export Wizard and double-check the destination server name, database name, authentication method, username, and password.
If using MySQL, log into your database via the command line or Workbench as root. Execute a GRANT statement to allow your user to connect from the client IP (e.g., GRANT ALL PRIVILEGES ON *.* TO 'username'@'client_ip' IDENTIFIED BY 'password'). Flush privileges afterward.
If using SQL Server, open SQL Server Management Studio (SSMS). Right-click the server, go to Properties > Security, and ensure 'SQL Server and Windows Authentication mode' is selected.
Use a standard database client to test the connection independently from the client machine before retrying the Excel import wizard.

Enable Network Protocols and Adjust Firewall Rules
Use this method if network restrictions or disabled remote connection protocols are blocking the database from receiving your Excel data.
Match Excel Driver Architecture
Apply this solution if your connection fails due to mismatched database providers or missing Excel database engines.
Prepare and Manage Data Seamlessly with WPS Spreadsheet
While resolving complex server connectivity errors, you can use WPS Office to easily manage, clean, and export your spreadsheet data into universally supported formats like CSV, simplifying your database import processes.

Frequently Asked Questions
What exactly does Error Code 1130 mean?
Error Code 1130 means 'Host is not allowed to connect to this server'. It is a server-side security rejection indicating that the IP address of the computer attempting the connection does not have the necessary privileges granted in the database.
Why does Error 1130 appear when importing Excel data?
The Import and Export wizard acts as a client connecting to your destination database. If your machine's IP is not whitelisted or authorized by the database server (especially MySQL), the connection will be blocked before any Excel data can be transferred.
Does exporting my Excel file to CSV help bypass this error?
Exporting to CSV bypasses Excel-specific driver issues (like architecture mismatches), which can simplify the import process. However, you must still fix the underlying Error 1130 by granting your IP address permission to connect to the database server.
How do I check if my database service is currently running?
Press Win + R, type 'services.msc', and press Enter. Scroll down to find the service named 'SQL Server' or 'MySQL'. Check the 'Status' column to ensure it reads 'Running'.




