close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

users.sql database table not importing

Thread began 10/19/2010 4:09 pm by pat356751 | Last modified 11/04/2010 9:38 am by Jason Byrnes | 2660 views | 29 replies |

pat356751

users.sql database table not importing

I'm having problems importing the users.sql database table using mysql query browser and PHPMYADMIN. I ran the sql script from terminal with the following results. This may not mean much but I'm looking for a way to troubleshoot the problem.


ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'databases' at line 3
mysql> CREATE TABLE `users` (
-> `UserID` int(11) NOT NULL auto_increment,
-> `UserEmail` varchar(500) default NULL,
-> `UserPassword` varchar(500) default NULL,
-> `UserFirstName` varchar(50) default NULL,
-> `UserLastName` varchar(50) default NULL,
-> `UserCity` varchar(90) default NULL,
-> `UserState` varchar(20) default NULL,
-> `UserZip` varchar(12) default NULL,
-> `UserEmailVerified` tinyint(1) default '0',
-> `UserRegistrationDate` timestamp NULL default CURRENT_TIMESTAMP,
-> `UserVerificationCode` varchar(20) default NULL,
-> `UserIP` varchar(50) default NULL,
-> `UserPhone` varchar(20) default NULL,
-> `UserFax` varchar(20) default NULL,
-> `UserCountry` varchar(20) default NULL,
-> `UserAddress` varchar(100) default NULL,
-> `UserAddress2` varchar(50) default NULL,
-> PRIMARY KEY (`UserID`)

Sign in to reply to this post

Jason ByrnesWebAssist

Do not use the teerminal for importing the database, you should be using PHPMyAdmin for this.

see the "How to import a MySQL (.SQL) file to your database" tutorial on the learning resources page foir details:
resources.php

Sign in to reply to this post

pat356751

I did and it didn't work.

Sign in to reply to this post

Jason ByrnesWebAssist

Did PHPMyAdmin give an error to?

what did happen?


what version of MySQL are you using?

Sign in to reply to this post

pat356751

version 5.1.51

Sign in to reply to this post

Jason ByrnesWebAssist

Did PHPMyAdmin give an error to?

what did happen?

Sign in to reply to this post

pat356751

error #1046 - No database selected

Sign in to reply to this post

Jason ByrnesWebAssist

did you select a database in the list of databases in PHPMyAdmin before going to the SQL tab and executing the SQL statement?

Sign in to reply to this post

pat356751

"did you select a database in the list of databases in PHPMyAdmin before going to the SQL tab and executing the SQL statement?"

No, I didn't. I selected test and the sql data is part of the test database. But I presume that isn't what is needed. I then went to MySQL localhost and created a new database called users. Next I selected the SQL tab and copied the users.sql table into the "Run SQL query/queries on server "localhost":" field and selected GO. users now shows up as a database. Is this the correct procedure?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, that is the correct procedure, you need to select the database that the users table will be created in before running the script.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...