Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am try to restore a big database from file using this command
source /path/to/database/file
it is return this error:
Failed to open file '/path/to/database/file', error: 27
the .sql file size 4.1G
If that's a file created by the mysqldump command, you'll probably want to run it using the mysql program. That'll be something like mysql -u <username> -p <databasename>
The mysqlimport command is another command you might wanna look at.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Hai I am trying to upload mysql database using putty i have tried few commands,
mysql -u {DB-USER-NAME} -p {DB-NAME} < /var/www/html/sample.sql
and tried
plink mysql -u username -p database_name < /var/www/html/sample.sql
but unable to upload files to linux server any suggetions
Try this syntax
mysql -u {DB-USER-NAME} -p --database={DB-NAME} < /var/www/html/sample.sql
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I want to do the mysql-dump using perl script.Backup from some tables from mysql database in perl script.
system(mysqldump -u username -pPassword databasename database table > to /local path) or die..;
Tell me this line which will store backup file of tables to the local path.
Have you tried running that line from the command prompt? It looks like it should work. Are you putting the command in quotes?
system('mysqldump -u username -pPassword databasename database table > to /local path') or die('This failed');
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I need to export a table of size 3GB to another database. Both are on different server.
When i tried to export using phpmyadmin tool, It leads to server error.
Also both database are on different servers. I need to export and import into other server.
Please advise.
Use mysqldump if that is a possibility, archive it and copy it afterwards to the new server.
If mysqldump is not accessible, phpMyAdmin has a feature to export it already archived ... try with that.
MySQL provides a tool exactly for this purpose:
commandline_of_your_choice#> mysqldump -uusername -p -hlocalhost DB_Name --single-transaction | mysql -uusername -p -hremotehost DB_Name
Simple as that :)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm running ubuntu 10.04 and recently have installed mysql server 5.1
but when i tried to log in, it showed me an error like this:
can't log in to mysql server through /var/run/mysqld/mysqld.sock
But last day I tried to kill all mysql processes and start again ,and when I killed mysqld_safe ,surprisingly I managed to log in and perform queries on mysql server through
mysql -u root -p
Now I want to ask if I can disable mysqld_safe for ever.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've installed MySQL on a Mac OSX Snow Leopart but I am unable to launch it through the terminal:
$ mysql
-bash: mysql: command not found
With $ echo $PATH:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin/usr/local/mysql/bin/mysql
With this:
$ /usr/local/mysql/bin/mysql
It works but I am unable to use it with Ruby on Rails. So I guess there's something that I'm missing. My apologies if it isn't clearly explained.
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin/usr/local/mysql/bin/mysql
should be
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/mysql/bin
Path goes to directories and you need the : between entries.
You can also symlink mysql into something in your path
ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql