Difference between revisions of "PhpMyAdmin Importing Database"

From Hostek.com Wiki
Jump to: navigation, search
(How to import your MySQL database using phpMyAdmin)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
__FORCETOC__
+
==How to import your MySQL database using phpMyAdmin==
 
+
[[File:Phpmyadmin_300.png‎]]
==How to import your MySQL database==
+
===For Windows VPSs or Windows Shared Servers:===
 
+
# Access your [https://wcp.hostek.com|'''Windows Control Panel (WCP.hostek.com)''']
# Access <b>Windows Control Panel (WCP)</b>
+
 
# You will first need to create a MySQL database by clicking on the <b>MySQL Icon</b> in the <b>Database</b> Section.
 
# You will first need to create a MySQL database by clicking on the <b>MySQL Icon</b> in the <b>Database</b> Section.
 
## NOTE: If you just created the database, you will need to refresh the page in order to complete the next step.
 
## NOTE: If you just created the database, you will need to refresh the page in order to complete the next step.
Line 9: Line 8:
 
## If you have multiple databases/users, choose which database your want to access
 
## If you have multiple databases/users, choose which database your want to access
 
# In phpMyAdmin, click on the database
 
# In phpMyAdmin, click on the database
# In the tab section look for select <b>Import</b>
+
# In the tab section look for and then select <b>Import</b>
 
# Under the <b>File to Import:</b> section, select <b>Browse...</b> to locate the SQL or .zip file on your computer
 
# Under the <b>File to Import:</b> section, select <b>Browse...</b> to locate the SQL or .zip file on your computer
# Hit <b>Go</b> at the bottom of the page to being the import.
+
# Hit <b>Go</b> at the bottom of the page to begin the import.
 
+
===For Linux/cPanel VPSs or Linux/cPanel Shared Servers:===
 +
# Access your cPanel account by using the information in your Hostek Welcome Email. If you are missing this e-mail or any log-in information, please submit a ticket via [https://support.hostek.com https://support.hostek.com] and we'd be glad to send it once more.
 +
# You will first need to create a MySQL database and user by clicking on the 'MySQL Database Wizard' icon in cPanel.
 +
# Follow the steps in the Wizard, creating a username, password, and database name as directed. Note that the username and database name will always be prefixed with your account name (example: hostek_database and hostek_user)
 +
# When you reach the step in the Wizard where you see '''ALL PRIVILEGES''', make sure to click the checkbox next to '''ALL PRIVILEGES''', then hit Next Step.
 +
# Once you've completed creating a MySQL database, go back to your main cPanel interface and click 'Phpmyadmin'.
 +
# In phpMyAdmin, click on the database on the left.
 +
# In the tab section at the top, look for <b>Import</b> and select it.
 +
# Under the <b>File to Import:</b> section, select <b>Browse...</b> to locate the SQL or .zip file on your computer [https://wiki.hostek.com/Mysql_backup| you created with Hostek.com's database backup wiki.] or via another method.
 +
# Hit <b>Go</b> at the bottom of the page to begin the import.
 
===Import Video Tutorial===
 
===Import Video Tutorial===
To view a video tutorial of this:
+
To view a video tutorial of this process on an example Windows environment:
 
[http://hostek.com/tutorials/phpma-import.html Importing databases and tables with phpMyAdmin]
 
[http://hostek.com/tutorials/phpma-import.html Importing databases and tables with phpMyAdmin]
 
  
 
==Troubleshooting==
 
==Troubleshooting==
Line 43: Line 50:
 
If your database is timing out during the import process this could mean that your database is too large. You will need to contact support by creating a support ticket at [https://support.hostek.com support.hostek.com] Please upload your SQL or .zip database file to your root folder of your site. Windows (wwwroot) Linux (public_html). We will need to import your database for you.
 
If your database is timing out during the import process this could mean that your database is too large. You will need to contact support by creating a support ticket at [https://support.hostek.com support.hostek.com] Please upload your SQL or .zip database file to your root folder of your site. Windows (wwwroot) Linux (public_html). We will need to import your database for you.
  
 +
 +
[[File:mysql-logo.jpg]]
  
 
[[Category:Databases-MySQL]]
 
[[Category:Databases-MySQL]]
 +
[[Category:MySQL]]
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Latest revision as of 16:50, 8 July 2016

How to import your MySQL database using phpMyAdmin

Phpmyadmin 300.png

For Windows VPSs or Windows Shared Servers:

  1. Access your Windows Control Panel (WCP.hostek.com)
  2. You will first need to create a MySQL database by clicking on the MySQL Icon in the Database Section.
    1. NOTE: If you just created the database, you will need to refresh the page in order to complete the next step.
  3. Click on the phpMyAdmin icon in the Database section
    1. If you have multiple databases/users, choose which database your want to access
  4. In phpMyAdmin, click on the database
  5. In the tab section look for and then select Import
  6. Under the File to Import: section, select Browse... to locate the SQL or .zip file on your computer
  7. Hit Go at the bottom of the page to begin the import.

For Linux/cPanel VPSs or Linux/cPanel Shared Servers:

  1. Access your cPanel account by using the information in your Hostek Welcome Email. If you are missing this e-mail or any log-in information, please submit a ticket via https://support.hostek.com and we'd be glad to send it once more.
  2. You will first need to create a MySQL database and user by clicking on the 'MySQL Database Wizard' icon in cPanel.
  3. Follow the steps in the Wizard, creating a username, password, and database name as directed. Note that the username and database name will always be prefixed with your account name (example: hostek_database and hostek_user)
  4. When you reach the step in the Wizard where you see ALL PRIVILEGES, make sure to click the checkbox next to ALL PRIVILEGES, then hit Next Step.
  5. Once you've completed creating a MySQL database, go back to your main cPanel interface and click 'Phpmyadmin'.
  6. In phpMyAdmin, click on the database on the left.
  7. In the tab section at the top, look for Import and select it.
  8. Under the File to Import: section, select Browse... to locate the SQL or .zip file on your computer you created with Hostek.com's database backup wiki. or via another method.
  9. Hit Go at the bottom of the page to begin the import.

Import Video Tutorial

To view a video tutorial of this process on an example Windows environment: Importing databases and tables with phpMyAdmin

Troubleshooting

#1007 - Can't create database

   #1007 - Can't create database '%dbname%'; database exists 

This indicates that you have a query in your SQL file that is
trying to create a database, and since it already exist, it will not
work. Someone must edit the file and remove the CREATE DATABASE query.

#1044 - Access denied for user

   #1044 - Access denied for user 'username'@'host' to database '%dbname%' 

The issue here indicates there is a query that is attempting to
create a database with the wrong username. If the database was created
with a different user name than what is in the SQL file, it will need to be updated.

#1064 - You have an error in your SQL syntax

   #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax

This issue indicated that there is a error in your syntax. It could be because you are trying to import an older version of sql with outdated syntax, or the file is corrupted in some way and the sql file is not readable. You can try exporting the file from the other location, but this error will generally give a location of the syntax error, and if it is only a few things, you can update the file then try to import it again.

Timing Out During Import

If your database is timing out during the import process this could mean that your database is too large. You will need to contact support by creating a support ticket at support.hostek.com Please upload your SQL or .zip database file to your root folder of your site. Windows (wwwroot) Linux (public_html). We will need to import your database for you.


Mysql-logo.jpg