Backup Mysql User Privileges
how do i backup mysql user privileges?
this will only backup the databases:
mysqldump --opt -u root -p --all-databases > data.sql
i would like to backup mysql user privileges too.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Serverbeach, User Privileges
I have a server from ServerBeach Linux Powerline 2600. CentOS5. It even has webmin on it. But this is what I'm trying to do, trying to add a user so the user can use apache/php/mysql/cron and cannot look into other directories like /etc SB is taking sometime, so I thought to post here as well. I know it's a linux admin thing, but I'd like to get some quick help as well..
View Replies!
View Related
[Cpanel::Mysql]: Not Updating Privileges
On a cPanel server, running RHEL 4 I got the following error (from cpanel logs) while associating an user with a DB from the cPanel admin: Fri Apr 11 17:02:47 2008 info [Cpanel::Mysql]: Not updating privileges for user (reseller login and no password specified in ~/.my.cnf) at /usr/local/cpanel/Cpanel/Mysql.pm line 268 Cpanel::Mysql::updateprivs('Cpanel::Mysql=HASH(0xa4a8768)') called at /usr/local/cpanel/bin/mysqladmin line 88 Fri Apr 11 17:02:47 2008 info [Cpanel::Mysql]: Not updating privileges for user (reseller login and no password specified in ~/.my.cnf) at /usr/local/cpanel/Cpanel/Mysql.pm line 268 In fact, from cPanel interface all privileges are added OK, but the MySQL itself is not connecting at all due to this error. I already tried: /scripts/mysqlup --force /scripts/upcp --force /usr/bin/mysql_fix_privilege_tables -u root --password=PASSWORD
View Replies!
View Related
Rsync Backup - User Permissions
I have a problem with my rsync backup First of all my setup is thus: I have a Linux box at the office which has an rsync cron on it which pulls from my web server as a backup. It pulls websites, mysql, conf files etc. My web server is running debian etch LAMP etc. When I originally set it up I used root user to log into the web server, and setup keys to authenticate, this worked perfectly. I then decided that having direct root access to the web server was a bad thing so I have turned off root login (PermitRootLogin no in sshd_config) I then setup a backup user which works fine for the website files but fails on permissions for the mysql data files (/var/lib/mysql) How can I get over this without granting root access to the backup user which would defeat the object of not allowing root access. I have been told about host authentication based on ip address but I have dynamic address at the office so that would be no good
View Replies!
View Related
How To Give File Ownership Privileges To External IP Address
I have a software program on my home PC that writes to files on my remote VPS every few minutes. The only way I can accomplish this is to CHMOD the files to 777 and give the whole world write priveledges. Is there a way I can give my external (home) IP address write priveledges to certain files on my VPS without CHMODing them as 777? I run the latest version of cPanel and WHM on my VPS.
View Replies!
View Related
MySQL Forgetting User Permissions
Does anyone know what could be the cause of this issue? I located a few others over at cpanel.net that have this problem, but no solution has been found. [url] I am running a VPS server with the following: WHM 10.8.0 cPanel 10.9.1-S14304 RedHat 9 i686 - WHM X v3.1.0 phpMyAdmin - 2.9.0.2 MySQL client version: 4.1.10 mysql version: 5.0.27-standard I have a database user that needs "Super Privileges" and so this was done. However, when Cpanel is updated the user permission is reset automatically from "ALL PRIVILEGES" to "USAGE". Here's a look at the database permissions from phpMyAdmin. Code: User Host Password Global privileges Grant hello localhost Yes ALL PRIVILEGES Yes hello_ % No ALL PRIVILEGES Yes hello_ localhost No ALL PRIVILEGES Yes The user "hello" loses its "ALL PRIVILEGES" and switches over to "USAGE" if an update is triggered. Updates to cpanel, creating/removing a database/user, and updating the account password will cause the switch.
View Replies!
View Related
Mysql/user Is Marked As Crashed
I am trying to start mysql but i am getting the following error MySQL manager or server PID file could not be found! [FAILED] Starting MySQL................................... [FAILED] I checked my hostname.err file in /var/lib/mysql and this is the error message it shows. 070130 17:59:41 mysqld started 070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired 070130 17:59:42 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired 070130 17:59:42 [ERROR] Fatal error: Can't open and lock privilege tables: Table './mysql/user' is marked as crashed and should be repaired 070130 17:59:42 mysqld ended how I would repair that to get mysql to start again?
View Replies!
View Related
What Are Common MySQL User Permissions
I want to use something like PHPBB forums and using one MySQL user and database. Just wondering, what are common user permissions I should set for the user? I want to try to minimize any permissions that can cause big risk to the server security. Here is a full list of permissions I can grant to the user (via Webmin): -Select table data -Insert table data -Update table data -Delete table data -Create tables -Drop tables -Grant privileges -Reference operations -Manage indexes -Alter tables -Create temp tables -Lock tables
View Replies!
View Related
MySQL Replication For User On Shared Server
I never did replication and do not know much about it so I figured I would ask here if anyone knows or has done it before like this. I have a user who wants me to enable replication on my server for his user. I dont like the sounds of it on a shared environment but if there is no risk to other users and its not a big resource hog I will do it. Anyway, from what I gather I have to: 1. execute: GRANT REPLICATION SLAVE ON user_main.* TO 'repl'@'ip-here' IDENTIFIED BY '4T6WjUZa'; [url] 2. Stop mysql server and Add in my.cnf: [mysqld] log-bin=mysql-bin server-id=1 slave-compressed=1 binlog-do-db=user_main start server[url] 3. execute: SHOW MASTER STATUS; we need values of colomns File and Position from output of above command[url] So my questions are: Is there any security risk? Is there significant extra resource usage? Is this even done on shared environments?
View Replies!
View Related
Mysql User Privilege Changed By Cpanel Or What
I am using Cpanel. One Cpanel account is backup. I use it to backup my database. Under mysql, I gave this account ( backup ) many priviledges. But when the backup script ran, error said that backup account can not 'lock table'. I gave "lock table' priviledge again and run the script, it is ok. But after a while, when the script ran autmatically on daily basis, it lost the 'lock table' priviledge again. I wonder if Cpanel is messing me up? What can I do about it? anyone knows?
View Replies!
View Related
MySQL: Access Denied For Root User
When I deleted a database, the user apparently was orphaned because when I tried to recreate it, it returned "user already exists". I've never encountered that problem although from Googling, I see others have and they delete the user to get around it. When I log into mysql using the da_admin@ account and attempt to remove the user with drop user <user_name>; I receive the following error message: ERROR 1227 (42000): Access denied; you need the CREATE USER privilege for this operation It seems I don't have rights even as the root user. How can I get remove the orphaned user?
View Replies!
View Related
Weird MySQL: User/pass Stops Working After A While
I am having a very strange problem with 2 different cPanel accounts on a server with 500-600 accounts. For some reason after a day or two the mysql username/password stops working. We have tried changing the MySQL user and the password with no success. The log does not indicate that the MySQL password was changed in any way. Only these 2 accounts are affected and this problem occurred at least half dozen times each. Again: these are two different accounts with 2 different MySQL users that after a while stop working (I am unable to determine if they stop working at the same time b/c they belong to different customers). When we reset the user (with the same pass) it works for a day or two. I have checked to connect not only from PHP but also from shell when it's down: it also doesn't work so this is a pure MySQL problem. Also on the server we have Fantastico.
View Replies!
View Related
Granting MySQL Command Line Permissions To A User
Is there any safe way to grant command line permissions to a user/specific account? One that only allows them access to databases on their account. The problem is that this user intermittently runs queries that cause their database to hang (including PHPMyAdmin, so they can't view the processlist through there), and I have to manually kill that process, because they can't. Server is 2.4.21 with MySQL 4.0.27, admin is cPanel WHM.
View Replies!
View Related
Error Backup, Transfer To New Server "Unable To Find The Cpanel User File."
I have problem: Searching /root.... Found cpmove-clanpz.tar.gz! Moving Packge to /root/cprestore/cpmove-clanpz.tar.gz Extracting tarball....window.scroll(0,175);............... Done Extracting Domain....Done Sorry, the copy failed. Unable to find the cpanel user file. Is the archive missing (cwd: /root/cprestore loaded cpmove-clanpz/cp/clanpz)? checked 4 files..... 1. /scripts/pkgacct username... 2. Transfer backup to new server 3. /scripts/restorepkg username 4. this error
View Replies!
View Related
MYSql Backup From V5 To V4
I am trying to backup and restore a database and seem to be running in to the following errors. ERROR 1005 (HY000) at line 29: Can't create table './tcadmin/tc_bandwidth_type.frm' (errno: 121) Source machine Windows Server 2003 mysql 5.0.11 destination machine RHEL 4.x MYsql 4.1.20 I think it is the way I am backing up the database that is the real problem I have checked the compatibility mode option in the administration panel for backup, run full backup, and lockled the tables and still I get the error. I have done some research and I think there is a command line I need to run to make it compatible with mysql 4.x systems but nothing seems to be right that I am doing. Can anyone here offer some insight to what the problem might be?
View Replies!
View Related
MySQL Backup - How Do You Do It Right
today when the indata1 file got corrupted and I found out that rsync was NOT backing it up. I had thought the rsyncing the life files was good enough and that if I had to restore I could just run mysqlrepair and get everything back. what is the RIGHT way to backup MySQL databases and do I want to somehow get rid of the inoddb stuff?
View Replies!
View Related
Incremental MySql Backup
Does anyone have experience in backing up mysql incrementally? From what I've read in the docs it's possible using the binary logs but I haven't been able to find a good resource on how to make this work. I have a database that is over 5GB. There are a few Myisam tables that are insert/select only and one innodb table that receives updates/deletes/selects/inserts. Ideally I wouldn't have to backup the 5GB every night, I'd prefer to only get the items that have changed. If I could make this work, then I could also get backups more often rather than once a night.
View Replies!
View Related
How To Fix Mysql Backup
I have some NAS storage to do backups to with my dedicated hosting provider. I setup automatic daily backups with WHM to backup the databases and accounts. The server is hosting one site. When it does the backup, it does a mysql dump, and essentially takes the site down for the whole time it is doing the backup because nobody can connect to the database while the dump is happening. Is there a better way to do the backup so that this won't happen, whether it be a different method of backing up to NAS, or just not using NAS at all and using some other method.
View Replies!
View Related
Mysql Backup, 2 Different Sizes Why
Using Cpanel: -I went to backup option and downloaded the database backup. 951kb -I went into phpadmin and checked addrop table. 1.5m Using SSH: command mysqldump -u myusername_usernam -pmypassword myusername_name > /home/name/backupz/name.sql = 949k 3 different sizes, I would figure maybe adding droptables would amount to higher size but the first way and third way i use, how come there is a size difference of 2kb? Which is the right way to backup mysql database safely?
View Replies!
View Related
MYSQL Backup Simple
Any of you know any good mysql backup software that does all the packages for you? meaning, backup the whole shabang with only ssh access? users,dbs, etc? and probably restore it too?
View Replies!
View Related
Backup MySQL Databases On PC
I host with hostgator and I was wondering if there are any software programs or services, or even something in my cpanel that can automatically grab my MySQL databases and everything on my server and make a backup on my personal PC? I know I can manually do this, but I would like something that automatically does it once a week or something to insure my clients data is always backed up.
View Replies!
View Related
Backup MySQL Intensive VPS
I have two VPS's which run a single MySQL intensive site. The first VPS runs cPanel and has about 50 databases, 200mb each. Second has another 30 databases, of the same size. What would be the best method to backup this website daily? At Current; I use automysqlbackup to backup all the databases at midnight (this crashes the VPS's for about 10 minutes each night). This dumps each one into a zipped file. Then the rsync copies the changed files (forum attachmenets, cpanel changes etc(whole server)) to an off site location. Are there any easier ways to do this? The databases are most important!
View Replies!
View Related
Backup In CPanel/WHM Without Mysql
The automatic backups you can setup in cpanel/whm bundle the entire user account. Is it possible for it to save everything except the mysql databases? I have an account that has databases over 5GB+ and would like to handle backing those up separately.
View Replies!
View Related
Secure MySQL Backup Script
Is there a method of running a back-up script,as root, using MySQL, without passing or storing the root password in the clear? I have tried OpenSSH with a nologin option using certificates, but I still have problems. I need to run it as a cron job every so often, (without specifics) securely. I understand I can use another user, other than root, with read-only, but I need to back up the whole db at once, not specific users db's.
View Replies!
View Related
Backup And Restore Mysql Databases
I have a corrupted VPS, and have some mysql databases on it. I want to backup databases and restore them on the new server. Cpanel service is down on the vps and I cannot transfer accts. Is it possible to do so ? 1- Zip or Tar the username folder in /home dir. 2- zip or tar the database name in /var/lib/mysql folder Either by SSH or File manager trough HyperVM Then transfer files some where safe... When vps is rebuilt, restore the archives and databases to the folders I have backed up before rebuilt. There are also some accounts on a terminated vps that there is only an image of the vps available so, I only can tar files using a jailed shell account, move to the new vps and untar them. how to do it and avoid database problems.
View Replies!
View Related
MySQL Backup Multiple Databases
My site is databases driven and runs on around 15 mySQL databases. Im wanting to download a local copy of these databases daily, however, if i try and back them up via cPanel (on a WHM VPS) they give me blank files. Each databases is around 55mb and growing. I can back them up one by one via phpmyadmin, it just takes around 5 minutes per database. Meaning around 40 minutes per night.. Is there any solution for having a script downloading them automatically so i can download them via ftp? I've tried [url].htm but it gives me blank files.
View Replies!
View Related
Backup BIG MySQL Database
What is the recommended method of backing up big MySQL database of size 2 GB ? Quote: # mysqldump gallery > gallery.sql mysqldump: Got error: 1017: Can't find file: './gallery/10tir_user_group.frm' (errno: 24) when using LOCK TABLES # I checked the table, it is fine, but can't do the backup. Quote: mysql> check table 10tir_user_group; +-------------------------+-------+----------+----------+ | Table | Op | Msg_type | Msg_text | +-------------------------+-------+----------+----------+ | gallery.10tir_user_group | check | status | OK | +-------------------------+-------+----------+----------+ 1 row in set (0.07 sec) mysql>
View Replies!
View Related
Backup MySQL Databases By Cron
how to backup MySQL databases by cron and have the backups sent to you by email, or have them uploaded by FTP. It is based on a script I found at another website though I can confirm it is fully working. Change the commented variables in the following file and save it as backup.sh: Code: #!/bin/sh # This script will backup one or more mySQL databases # and then optionally email them and/or FTP them # This script will create a different backup file for each database by day of the week # i.e. 1-dbname1.sql.gz for database=dbname1 on Monday (day=1) # This is a trick so that you never have more than 7 days worth of backups on your FTP server. # as the weeks rotate, the files from the same day of the prev week are overwritten. #/bin/sh /home/user/directory/scriptname.sh > /dev/null ############################################################ #===> site-specific variables - customize for your site # List all of the MySQL databases that you want to backup in here, # each seperated by a space # If not run by root, only one db per script instance databases="mydbname" # Directory where you want the backup files to be placed backupdir=/home/mydomain/backups # MySQL dump command, use the full path name here mysqldumpcmd=/usr/bin/mysqldump # MySQL Username and password userpassword=" --user=myuser --password=mypasswd" # MySQL dump options dumpoptions=" --quick --add-drop-table --add-locks --extended-insert --lock-tables" # Unix Commands gzip=/bin/gzip uuencode=/usr/bin/uuencode mail=/bin/mail # Send Backup? Would you like the backup emailed to you? # Set to "y" if you do sendbackup="n" subject="mySQL Backup" mailto="me@mydomain.com" #===> site-specific variables for FTP ftpbackup="y" ftpserver="myftpserver.com" ftpuser="myftpuser" ftppasswd="myftppasswd" # If you are keeping the backups in a subdir to your FTP root ftpdir="forums" #===> END site-specific variables - customize for your site ############################################################ # Get the Day of the Week (0-6) # This allows to save one backup for each day of the week # Just alter the date command if you want to use a timestamp DOW=`date +%w` # Create our backup directory if not already there mkdir -p ${backupdir} if [ ! -d ${backupdir} ] then echo "Not a directory: ${backupdir}" exit 1 fi # Dump all of our databases echo "Dumping MySQL Databases" for database in $databases do $mysqldumpcmd $userpassword $dumpoptions $database > ${backupdir}/${DOW}-${database}.sql done # Compress all of our backup files echo "Compressing Dump Files" for database in $databases do rm -f ${backupdir}/${DOW}-${database}.sql.gz $gzip ${backupdir}/${DOW}-${database}.sql done # Send the backups via email if [ $sendbackup = "y" ] then for database in $databases do $uuencode ${backupdir}/${DOW}-${database}.sql.gz > ${backupdir}/${database}.sql.gz.uu $mail -s "$subject : $database" $mailto < ${backupdir}/${DOW}-${database}.sql.gz.uu done fi # FTP it to the off-site server echo "FTP file to $ftpserver FTP server" if [ $ftpbackup = "y" ] then for database in $databases do echo "==> ${backupdir}/${DOW}-${database}.sql.gz" ftp -n $ftpserver <<EOF user $ftpuser $ftppasswd bin prompt cd $ftpdir lcd ${backupdir} put ${DOW}-${database}.sql.gz quit EOF done fi # And we're done ls -l ${backupdir} echo "Dump Complete!" exit Upload backup.sh to your server, to any directory you want. A directory which is not web-accessible will stop your login information being seen by just anyone . You should chmod the file to 777: Code: chmod 777 backup.sh If you uploaded this file from a Windows machine you will need to convert the file to Unix format. You should run the following command by SSH in the appropriate directory: Code: dos2unix backup.sh If you don't have dos2unix installed, you can install it using yum if you have that: Code: yum install dos2unix If you don't have yum, get it here. You may want to test the script at this point to make sure it's doing what you want it to. Change to the appropriate directory and run this command: Code: ./backup.sh Once you're happy with it, enter it into the crontab to run daily (or whenever you want). Cron jobs vary a lot depending on the configuration of your system, so check Google for how to do it on your system. The command you will need to run by cron is: Code: /path/to/file/backup.sh
View Replies!
View Related
Host That Allows MySQL Backup/restore Via FTP
I need to get the h3ll away from Godaddy, fast! However, my site has a large MySQL database (200 megabytes) and it's impossible to backup or restore via phpMyadmin. Godaddy has a feature on their control panel, where you can restore/backup your MySQL database to a special diretory on your web http file space, which you can upload/download vis FTP. I use this alot. Is there any other web hosting company that offers such a feature? I haven't seen this anywhere except on Godaddy. As to why I need to get away from Godaddy: Basically what they did was, my site was getting too much traffic (even though it's still well under Godaddy's advertised limits for that plan)... so they sent me an email that says: "Your site is using too much server resources. We have moved you to a new server to protect our other customers. Please identify steps to reduce your site traffic and contact us." They moved my site to what is, apparently, a punishment area (Godaddy Hell) where all the high volume sites go. It is so extremely slow, my site might as well not exist... it is inaccessible to my visitors for all intents and purposes.
View Replies!
View Related
How To Easiest Do Backup And Transfer Of Mysql Files
I have following problem-i have over 20 sites on server and each site has own database.Is there a way to speed up backup and transfer or other server? Method which i use right now it's following:first i archive entire directory using command tar -pczf name.tar.gz public_html,and then repeat with each directory.But i think i could simply archive all requied directories,but that will took toomuch time,so if i drop connection during archiving it wont be archived at all then.So i think best solution will be to create some kind of batch command which can load in background,so that means command wont stop if client lost connection. So let's say i have 2 sites and two directories located and different places. One is at home/site1 and other at home/site2 So i think i would need to put command into batch file tar -pczf site.tar.gz. /home/site1 and tar -pczf site2.tar.gz /home/site2 Will that work? Also second part,mysql databases,i founded if i login into phpmyadmin as root i can see all databases.I managed to export all databases,but question will import again to phpmyadmin work.I think phpmyadmin create command for each database "if there is no db sitename_mysqlbase,create it",but howmuch i know phpmyadmin have limit with importing size of mysql database.Could that be done with import/export mysql command?
View Replies!
View Related
MySQL Administrator GUI Disappear When Restore Backup On CentOS 5.x
I have some server with OS: CentOS 5.x one day, I have to replicate 2 servers together. so, I have to stop webserver and use MySQL Administrator GUI Tool to backup it. My steps follow: (i work directly on Server 2 and i wantna to use mysql administrator gui to monitor and config replication). 1. Server 2: ssh to server 1-> connect mySQL -> add any host to root access 2. Server 2: use mySQL Administrator connect to server 1 with root 3. Server 2: backup from server 1 on Desktop location 4. Server 2: Restore it use mysql administrator tool. It works well but when i click Restore button, MySQL Administrator GUI Tool disappear! What's problem with this tools or server 2?
View Replies!
View Related
Installed MySQL In /usr/local/mysql But Error In /var/lib/mysql
I installed the MySQL binary packages in /usr/local/mysql/ after removing the MySQL RPM package. MySQL is functioning when I executed /usr/local/mysql/bin/safe_mysqld. I reinstalled MySQL before I installed PHP. When I used a PHP script to access a MySQL database, it outputs an error: Code: Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2002): can't connect to local mysql server through socket /var/lib/mysql/mysql.sock in index.php on line 2 However, I installed MySQL in /usr/local/mysql, not in /var/lib/mysql. How do I fix MySQL?
View Replies!
View Related
Rsyn --backup --backup-dir Switches For Incremental Backs
I current do some rsync backups with a command like so every day rsync -az -e ssh --stats --delete --exclude "stuff" / user@server:/home/user/ What I want to do is have some incremental backups in there in subdirectories. So, for example, something like this on the remote server /home/user/something.tuesday /home/user/something.friday I thought the --backup --backup-dir Switches were used to store just the files that had changed in seperate directories, am I wrong on that? I've read everything I could find, including the big rsnapshot scripts, but I'm not able to do what I want, it seems so simple but something's not right, am I wrong that subdirs should have just files that are new or have changed. I tried various things like this, but had no luck rsync -az -e ssh --stats --delete --backup --backup-dir=/home.Thursday --exclude "stuff" / user@server:/home/user/
View Replies!
View Related
[cpbackup] Backup Failed! /backup Is Not Mounted!
my cpanel doesn't get backups. When I force it, it gives me this error: mount: can't find /backup in /etc/fstab or /etc/mtab mount: can't find /backup in /etc/fstab or /etc/mtab [cpbackup] Backup failed! /bekkaplars is not mounted! at /scripts/cpbackup line 415. It's a vps. Another interesting thing is, my other 3 vpses run good even /etc/fstab has no line like /backup in there, also.
View Replies!
View Related
Remote Backup Or Local Backup
I would like to weight the benefits and costs of using remote backup and local backup to another hardisk? Let's assume the price is the same. What's the benefits of using remote backup? Is it secured to use local backup in another hardisk? I'm running on linux centos. What happend if hacker get hold of my server? Currently, i have 80GB of diskspace. Does it mean i will need at least 80GB of ANOTHER hardisk to backup that?
View Replies!
View Related
How To Restore Mysql Databases From /var/lib/mysql/user_database/ Files Only
I recently had a harddrive failure and luckliy I can still access certain directories on this failed drive. I can still access the /var/lib/mysql/ directory which holds all the users databases and have backed all these up separately using tar. Now what I need to know is how do you restore these database files to another server? I tried simply untar'ing one of these to the new servers /var/lib/mysql/ direcotry and it stuffed Mysql up - it went offline. I had to get a cpanel tech to bring Mysql back online. how can I get these database files to fully work on a new server?
View Replies!
View Related
Can I Move /var/lib/mysql To /home/mysql
my /var partition is full, im not sure if any files i can remove to get more free space on /var partition. because there are more free space on /home, i think if i can move all the /var/lib/mysql to /home/mysql, if yes,howcan i move it and do any change, can let the sql data do not lose, andrun well in the feature ?
View Replies!
View Related
|