From: Anacreo <an...@gm...> - 2008-11-21 07:00:14
|
Try doing... mysql -u **** --password=***** -h localhost database < filename.sql Or: type filename.sql | mysql -u **** --password=****** -h localhost database Paste the Syntax error... if it's complaining that the table already exists, you'll need to remove the create table statements in your filename.sql file. Alec On Fri, Nov 21, 2008 at 12:47 AM, Janine Starykowicz <jr...@ba... > wrote: > I'm in Windows. I've tried doing all kinds of variations on what you > posted, and keep getting a syntax error. > > Janine > > Anacreo wrote: > > You want to make sure you're not in the "mysql>" prompt when you're doing > > this... > > > > Try something like: > > > > unix prompt> mysql -u **** -p ****** -h localhost database < filename.sql > > > > If you're in Windows the syntax would be a bit different. > > > > Alec > > > > On Thu, Nov 20, 2008 at 11:56 PM, Janine Starykowicz < > jr...@ba... > > > >> wrote: > >> > > > > > >> I am attempting to mirror SMF on my WinXP laptop to test upgrades. I > >> have Apache, PHP, mySQL, and one working install of Drupal all tested > >> and running. Apache, PHP and mySQL are all installed in c:\Program > >> Files. Database is created and empty and I exported the .sql file > >> through phpMyAdmin from my public server. > >> > >> After logging in to mysql and using the database, at the command line > >> mysql> I enter: > >> mysql -u **** -p ****** -h localhost database < filename.sql; > >> where user and password is for mySQL > >> > >> and get: > >> 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 'mysql > >> -u **** -p ******* -h localhost database < filename.sql' at line 1 > >> > >> I have also tried exiting mysql and changing (with cd) to the MySQL > >> subdirectory (where the .sql file is). That gives me a long list of > >> commands instead of an error message, but the database is still empty > >> and I am not running mysql when the commands finish listing. > >> > >> I have tried taking out the spaces after -u and -p. I've tried leaving > >> the space after -u, no space after -p and no space after < with ./ as > >> the path. > >> > >> I tried installing MySQL Tools and using the MySQL Administrator, it > >> said it can't restore files generated by mysqldump. > >> > >> What am I doing wrong? Where should I put the .sql file and how should > >> I list the path? Which spaces are needed? > >> > >> Thanks! > >> Janine > >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > |