hello
I know this question had been asked many times and i read all the threads but i want to know is it possible to load the data through the MySQL command line???
I am trying to load the drpal scheme to my databse but the command which wrote in the instalation text file didn't work...
mysql -u user -p drupal < database\databse.mysql
i tried the slash and the backslash and my Mysql directory is in the path and i tried to give the full path for the databse and/or to the mysql but still the same problem(the system cannot find the file specified)
is there a way to load this scheme through the MySQL command line rather than through windows command line??? like in loading data from a text file??? and if so what is the command that i have to write it in the MySQL command line???
BTW am using MySQL 5.0
Comments
windows?
on a unix host (see here) you should be able to do this once mysql is installed and in your path. in that case you need a forward (/) slash and you have to be in the drupal directory (e.g cd /var/www/html)
--
groets
bertb
--
groets
bert boerland
Yes Windows
But am not running unix am running windows XP SP2!!!!
maybe
start/run/find mysql
/start/run/cmd
cd in command line
drag location of mysql to command line (so it says: d:\apps\mysql\mysql.exe or so)
type databaes\databaseyouwanttoinsert.sql and hin enter
basically, make sure that you have the absolute path of your mysql command (mysql.exe? I have no idea) in the c ommand line
you might want to search mysql and windows help elsewhere (not really drupal related) or try phpmyadmin
--
groets
bertb
--
groets
bert boerland
Thank you but...
thank you but i did do that but what am asking for is how to load the database through the MySQL command line NOT through the windows command line???
and not through PHPMyadmin... i think there is a command in the MySQL command line to do so; like in loading data from text file to the table...may be????
If you wanna do it in MySQL, see MySQL docs
So, it seems you are asking a MySQL Documentation Question and don't want to follow the usual
... which should have worked, certainly the the full file path if you'd spelled it right...
.dan.
http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
But the usual way didn't work!!!
i did try the usual way but it didn't work and while it could be through the windows command line prompt then it should be work through the MySQL command line ... but the question is who know this command??? i think all use the usual way(as you name it) or use th phpMyadmin but no one think to use the MySQL command line; may be because it only with the new versions of MySQL????i don't know cause am Newbie to both PHP and MySQL.
see the docs
You realize the difference between the Windows command line (which you don't like) and the MySQL shell (which looks almost the same, but is a lot more fun to use), and you are right, there is a way to do it using the MySQL Shell.
'source' is the command, \. is just the default argument.
You load relative paths relative to wherever you started your shell. Depending on many many things, it may be somewhere useless like c:\...\My Documents\
So yes, you should use the full path, as you are ALMOST doing.
But because you've got spaces in the path you should either quote it, or just type c:\progra~1\...
.dan.
(sorry, my link to the docs in the comment above was not quite what you needed this time)
http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
you get it
you are absolutly right ... i did search and read in the documentation but i didn't find the command so i came here to ask if anybody know it ... thank you very much for the advice but i did it already before i came here.
Thank you very very much
Now you did it really
it was the spaces within the path ... but now i have another problem which is ...
error 1364(hy000) on line 803 : field 'pages' dosn't have a defult valueis it a bug or what???
source (\.)
The command you are looking for (easily obtained by typing help at the mysql> prompt):
just make sure you give it the correct path to the script file that comes with drupal
you are right...
yes i see it but how the command should be???
is that right??
mysql> \. C:/Program files/Apache2/htdocs/drupal/database/database.mysqlbut where it will load it???