Tag Info

New answers tagged

1

Perhaps you should dump the users and load the users into the VM Here is my post : Export all MySQL users After running the code in it and saving it to a file called MyDatabaseUSers.sql, you log into mysql on the VM and run this: mysql> source MyDatabaseUSers.sql This will create all the users with the same grants and passwords. Don't worry: ...


0

For some reason, one of the views is lost. You should re-install common_schema. Or maybe you don't have all proper access rights - in that case, just check your rights.


1

You will have to mysqldump around moments_production_wp I have old posts to bypass databases and tables Dec 16, 2011 : How do you mysqldump specific table(s)? Feb 20, 2013 : There is any option for mysqldump to ignore databases for backup in mysql Using the same concepts, here is how to mysqldump all except moments_production_wp MYSQL_USER=root ...


1

Perhaps you should use --single-transaction mysqldump --single-transaction -u root -p common_schema > common_schema_bkup.sql Why ? According to the MySQL Documentation on mysqldump, you need the following rights: mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW for dumped views, TRIGGER for dumped triggers, and LOCK ...


0

If the file is what you have in hand and you are manipulating it from a shell / console, I would use sed to do string replacements on lines starting with CREATE DABATASE, USE and optionnally -- (mysqldump comments) Replacing the db name on lines that matches Create Database, Use and mysqldump comments dbfile="yoursqldumpfile.sql"; dbname="current_db_name"; ...


0

Another way to import dump files when source <filename> doesn't work is to do the following: Dump ~> mysqldump --user=<user> --password=<password> <db_name> > <export_file_name>.sql Import > mysql -u <user> -p <pass> <db_name> mysql> USE <db_name>; (if you didn't already select) mysql> ...


1

If you're running on Linux (any with awk), you could run: awk '!/^DROP TABLE IF EXISTS/{print}' db_dump_sql | mysql -u $user -p --force --database=$db PD: I added --force that means: --force, -f Continue even if an SQL error occurs. Test: root@onare:/home/onare# touch db_dump_sql root@onare:/home/onare# echo "DROP TABLE IF EXISTS/" >> ...


2

cat 1.sql | grep -v "DROP TABLE" | mysql --force Assuming no other string contains drop commands this should work.. Updated: use --force to ignore errors by CREATE TABLE.


1

That error is nonsequiter with regards to MySQL. This would especially be true if your Windows server crashed for reasons other than MySQL. There are ways to fix IRQL_NOT_LESS_OR_EQUAL. However, if you are reloading a mysqldump and it is the only reason Windows crashes, you may have to accommodate Windows until you fix the IRQL_NOT_LESS_OR_EQUAL error by ...


1

For a relatively small database, the mysqldump utility can be an effective way to backup the database. We use a shell script, execution scheduled thru cron We run separate mysqldump for each database. We omit the "create database" and "drop table" statements. We also include options to get a "consistent" backup of the InnoDB tables. There's some ...


2

You would dump each table using the --where option. I wrote a rather gnarly post about 4 years ago : Is it possible to mysqldump a subset of a database required to reproduce a query? In your case, you can do the following: Suppose the database is called schooldb Dump by SchoolID MYSQL_USER=root MYSQL_PASS=rootpassword MYSQL_CONN="-u${MYSQL_USER} ...



Top 50 recent answers are included