I have to upload part of my database periodically when i make changes to product data etc. However I only want to upload certain tables. We suffer from bandwidth chock here, so i want to write a couple of separate scripts that upload parts of the database that changed. The database is large and it is split into to sections Feed driven data, which is 27MB and Manual driven data which is 8MB. To reduce the upload time i decided to write a script that uploads the feed stuff (to be run once a month) and another script to upload the manual stuff (could be run daily) to reduce the upload time. I therefore decided i would have a script to copy the sections of the database in to a smaller database on the development server. Then a script on the live server to download the smaller database from the development server. I am however having troubles creating the first script.
Here is what i have.
Am i on the right track? Should i be doing this with a single command somehow? Will this work? I am reluctant to test it without some advice because i don't want to much anything up.
I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated.
Input:
test_data_1
1 2 90%
4 3 91%
5 4 90%
6 5 90%
9 6 90%
test_data_2
3 5 92%
5 4 92%
7 3 93%
9 2 92%
1 1 92%
...
Output:... (7 Replies)
OS: Linux ambglx02 2.6.16.60-0.21-default #1 Tue May 6 12:41:02 UTC 2008 i686 i686 i386 GNU/Linux
Shell: bash
Currently I have a mysqldump script to backup my mysql database, the command is as below:
/opt/novell/mysql/bin/mysqldump --add-drop-table -u root -p -h mydb > /home/john/mydb.sql
... (5 Replies)
hi,
I need to backup a database but I'm getting the error "bus error - core dumped" just after I run mysqldump command.
The server has installed solaris 9.
Any help would be appreciated (3 Replies)
Hi All,
I have a data calculation process-a perl script running each and every hour which will do some calculations on the data stored in a mysql server. Normally it tooks around 2minutes (max) to complete.
But in case if i did any actions on the linux box where the database is... (7 Replies)
I want to take a backup of a database and redirect the output of the whole process to a log file. I am using the below command:
mysqldump -A --add-drop-table > mysql-daily-backup.sql &> /tmp/backup_log/mysql.log
Is there anything wrong with the syntax?
---------- Post updated at 08:32 PM... (0 Replies)
My crontab file tells cron to run a certain shell script at 10:30 AM every day. The shell script backs up my database with mysqldump and then runs a sed script that does some editing of the backup file.
I have programmed the shell script to write an error message to a file I have in my home... (1 Reply)
I have a very simple script that uses a cron job to take a daily backup of our orders database.
echo "Dumping ORDERS database";
mysqldump -u root --password='mypassword' -h '1.1.1.1' --opt --compress ORDERS $tbl_names > /Volumes/Files_Backup_1/db_backups/orders.sql
echo "Copied database to... (2 Replies)
Hi @ all
I need a little bit help with a tricky problem ...
Here´s the situation:
We´ve 2 MySQL-Servers, one is productive, the other is Backup.
At the productive Server there runs every 2 hours a cron Job which does a Dump from MySQL-DB with script 'automysqlbackup.sh' and
copy it then... (7 Replies)
Discussion started by: jackcracker
7 Replies
LEARN ABOUT CENTOS
mysql_fix_privilege_tables
MYSQL_FIX_PRIVILE(1) MySQL Database System MYSQL_FIX_PRIVILE(1)NAME
mysql_fix_privilege_tables - upgrade MySQL system tables
SYNOPSIS
mysql_fix_privilege_tables --password=root_password
DESCRIPTION
Note
In MySQL 5.1.7, mysql_fix_privilege_tables was superseded by mysql_upgrade, which should be used instead. See mysql_upgrade(1).
Some releases of MySQL introduce changes to the structure of the system tables in the mysql database to add new privileges or support new
features. When you update to a new version of MySQL, you should update your system tables as well to make sure that their structure is up
to date. Otherwise, there might be capabilities that you cannot take advantage of.
mysql_fix_privilege_tables is an older script that previously was used to uprade the system tables in the mysql database after a MySQL
upgrade.
Before running mysql_fix_privilege_tables, make a backup of your mysql database.
On Unix or Unix-like systems, update the system tables by running the mysql_fix_privilege_tables script:
shell> mysql_fix_privilege_tables
You must run this script while the server is running. It attempts to connect to the server running on the local host as root. If your root
account requires a password, indicate the password on the command line like this:
shell> mysql_fix_privilege_tables --password=root_password
The mysql_fix_privilege_tables script performs any actions necessary to convert your system tables to the current format. You might see
some Duplicate column name warnings as it runs; you can ignore them.
After running the script, stop the server and restart it so that any changes made to the system tables take effect.
On Windows systems, MySQL distributions include a mysql_fix_privilege_tables.sql SQL script that you can run using the mysql client. For
example, if your MySQL installation is located at C:Program FilesMySQLMySQL Server 5.1, the commands look like this:
C:> cd "C:Program FilesMySQLMySQL Server 5.1"
C:> binmysql -u root -p mysql
mysql> SOURCE share/mysql_fix_privilege_tables.sql
Note
Prior to version 5.1.17, the mysql_fix_privilege_tables.sql script is found in the scripts directory.
The mysql command will prompt you for the root password; enter it when prompted.
If your installation is located in some other directory, adjust the path names appropriately.
As with the Unix procedure, you might see some Duplicate column name warnings as mysql processes the statements in the
mysql_fix_privilege_tables.sql script; you can ignore them.
After running the script, stop the server and restart it.
COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online
at http://dev.mysql.com/doc/.
AUTHOR
Sun Microsystems, Inc. (http://www.mysql.com/).
MySQL 5.1 04/06/2010 MYSQL_FIX_PRIVILE(1)