|
|
... Alternatively you can use --no-data instead if you find that easier to remember:
mysqldump --no-data -u someuser -p mydatabase
... password. For example, if the password was "apples" do this:
mysqldump --no-data -u someuser -papples mydatabase
... window which may not be very useful. To save it to a file instead redirect the output. For example:
mysqldump -d -u someuser -p mydatabase > ...
|
|
... /opt/lampp/ and some traditional commands that are available on my system from the command line like mysql, and mysqldump do not understand that other installation I have in the XAMPP setup.
So when I was running commands using Drush like: $drush sql dump I was getting an error like the following:
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket ' ...
|
|
Import/Export MySQL Database Through SSH
To Export a MySQL Database run:
Quote:
mysqldump -u username -p database_name > dumpfile.sql
To Import a MySQL Database run:
Quote:
mysql -u username -p database_name < dumpfile.sql
SOURCE : BODHOST
Related posts
The Longest Tweet (0)
MYSQL Privileges (0)
features request (0)
Best Ways To Monitorize Website Traffic (0)
Best Mysql Backup ...
|
|
... InnoDB. I did not use any special features of TokuDB. I started with an sql file produced by mysqldump that was 2.0 Gb in size, which had 19 million rows, and performed some simple tests on it ... with an import of 39,334,901 rows, a 4.0 Gb file produced by mysqldump. However, since we want more than 100 million rows, after the import we did 2 inserts to produce almost 160 million records:
INSERT ...
|
|
... from server wingnut to server thumbscrew.
First I logged into thumbscrew, and I use scp from copy everything..
scp -r root@wingnut:/var/www/public_html/bugzilla /var/www/public_html/bugzilla
Now I have to get the database..
I log into wingnut and run mysqldump, -p will prompt for password.
(My database is casually named.. bugzilla.)
mysqldump -p -r /tmp/bugzilla.sql bugzilla
Now I go back
|
|
... files over
# a certain number of days old.
# Assumes 'gzip' and 'mysqldump' are in the PATH.
#
# Admittedly a bit fast and loose with variables and system returns.
# It might ... &get_date;
foreach $db (@dbs) {
# dump databse
system("mysqldump --flush-logs --opt --host=$host --user=$username --password=$pw $db > $workingdir/$ ...
|
|
... that will create a bzip2 archive of the drupal codebase (including site-specific dirs), and then create mysqldump exports of each site’s database and gzip those files. This particular script requires that the drupal install ... up MySQL db ${line[1]} ... "
DUMPFILE=${line[0]}_${DATESTAMP}.sql
mysqldump -u ${line[2]} -p${line[3]} ${line[1]} > ${DUMPFILE}
gzip ${ ...
|
|
... actual bash script code first (file named backup.sh) :
#!/bin/bash
date=`date -I`
mysqldump -h your_domain -u userDB -pPASSWORD DBname | gzip > /home/hthought/backup-$ ... backup-2009-11-23.sql.gz”.
The command that is used in order to create the actual dump is mysqldump. Using the -h switch, we can specify the hostname of the server where the mySQL server is located. Thus, if mySQL runs ...
|
|
Hello,
When trying to use mysqldump, I got this error message:
Quote: mysqldump: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061) when trying to connect According to the MySQL Documentation Library, error 2003 means that my network connection has been refused and that I should check that there is a MySQL server running, that it has network ...
|
|
... A good one woudl be a /backups/ folder on the same level as public_html for now. Run the following command:
mysqldump –opt -u dbuser -p dbname> dbname.sql
Replace dbuser, ...
gzip -c dbname.sql>dbname.sql.gz
I like doing it in two steps so I know it’s done right, but if you wanted to do it all in one go, try this:
mysqldump –opt -u dbuser -p dbname> dbname.sql | gzip & ...
|
|
to back up your databases, you can do the following...
mysqldump -u > dumpfilename.sql
for example I have a database with the following informations...
root username: James
root password: Aves
Database Name: aeisjean
and I want to save the copy as aeisjean.sql
you will do this...
mysqldump -u James -pAves aeisjean > aeisjean.sql
to restore just type
...
|
|
... file size, when the raw file size is less than 20M this overhead doesn’t matter – and gzip should handle some extra redundancy well.
#!/bin/bash -e
for n in db1 etc ; do
/usr/bin/mysqldump --skip-extended-insert $n | gzip -9 > /mysql-backup/$n-`date +%Y-%m-%d`.gz
done
Then I have a backup server running the following script from a cron job to copy all the dump files off ...
|
|
... ;PASSWORD"
SQLFILE="db _NAME_$(date '+%d_%m_%y').sql"
LOCALBACKUPDIR="/home/ /data/backup"
echo "* Performing SQL dump..."
cd $LOCALBACKUPDIR
mysqldump -h $SQLHOST --add-drop-table --user="$SQLUSER" --password="$SQLPASS" $SQLDB > $SQLFILE
# Remove backups older than 7 days:
MaxFileAge=7
find $ ...
|
|
... on Linux, it does not install mysql to your path, but you can get around it by adding the bin directory to your path, or defining an alias.
To copy over data from my old MySQL database, I used mysqldump. You can find detailed instructions here.
Open Office
Open Office is an office suite, similar to the Microsoft Office suite. You can get Microsoft Office for Apple, but it costs money. I am not ...
|
|
... restart
Start mysql
sudo mysqld_safe5
Change database privileges
grant all privileges on "databasename".* to 'name'@'localhost' identified by 'name'
Dump database
mysqldump db_name > backup-file.sql
Import database
mysql db_name < backup-file.sql
Initialize git repository
git init
Configure git remote server
git repo-config remote.origin.url
...
|
|
Related Tags
|