Server :: MySQL Permissions - Copy Tables From One DB To Another

Jun 14, 2010

I am using Joomla and a script within it. That Script is suppose to copy tables from one DB to another.

Code:
Error(1) [1142] query [CREATE OR REPLACE VIEW test_users AS SELECT * FROM `localiz_master`.`jos_users`]. DB Error: CREATE VIEW command denied to user 'localiz_master'@'localhost' for table 'test_users' SQL=CREATE OR REPLACE VIEW test_users AS SELECT * FROM `localiz_master`.`jos_users`
Error [1142] retrying query [CREATE OR REPLACE VIEW test_users AS SELECT * FROM `localiz_master`.`jos_users`]. DB Error: CREATE VIEW command denied to user 'localiz_master'@'localhost' for table 'test_users' SQL=CREATE OR REPLACE VIEW test_users AS SELECT * FROM `localiz_master`.`jos_users`
localiz_master: name of the DB from which data is suppose to be copied.
jos_users: name of the table form the main DB.
localiz_master: user for the DB.
localhost: host
test_users: name of the table to be created.

We do have phpmyadmin but the user's table is hidden. What SSH command we might run to make localiz_master user have access to all the databases.

View 6 Replies


ADVERTISEMENT

General :: Backup All Tables In Mysql?

Nov 18, 2009

I want to write the shell script which

1)Finds all the databases in mysql

2)create the folder who ever is the creater of that database or owner of that database. I think the databse starts with username_ so i think i have to split the database name to get folders name . How to do that? backs up the databases belonging to that user.

View 3 Replies View Related

Software :: Detect When Mysql Has Locked Tables?

Jan 24, 2011

I'm running Mysql server. I need to know if is possible to generate an alert (email) when in the database are locked tables.
Is that possible?

View 3 Replies View Related

Programming :: MySQL Error When Creating FK In Tables

Dec 11, 2009

Can't single the cause of the error.

mysql> CREATE TABLE Shipment (
-> Shipment_ID INT(10) NOT NULL,
-> Delivery_ID INT(10) NOT NULL,
-> Customer_ID INT(10) NOT NULL,
-> Driver_Employee_ID INT(10) NOT NULL,
-> Consignee VARCHAR(255) NOT NULL,
-> Payment_Method VARCHAR(255) NOT NULL,
-> Payment_Received VARCHAR(1) NOT NULL,
-> CONSTRAINT PRIMARY KEY (`Shipment_ID`)
-> FOREIGN KEY (`Delivery_ID`) REFERENCES `Delivery`(`Delivery_ID`)
-> FOREIGN KEY (`Customer_ID`) REFERENCES `Customer`(`Customer_ID`)
-> FOREIGN KEY (`Driver_Employee_ID`) REFERENCES `Driver`(`Driver_Employee_ID`)
-> )ENGINE=InnoDB DEFAULT CHARSET=latin1;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOREIGN KEY (`Delivery_ID`) REFERENCES `Delivery`(`Delivery_ID`)
FOREIGN KEY (`C' at line 10)

View 4 Replies View Related

Server :: MySQL Root User - Administration And Permissions

Jun 22, 2010

I'm using an older redhat system (2.6.9-22.ELsmp) here which is running an older mysql (server version: 4.1.12). I don't think that's the source of the problems. I believe that have understood things rightly when I say that the mysql root user is unrelated to the linux root user ... in my case I believe the root user to be the unix user mysql. So when I connect to the server (local host from a local terminal) I use:
Code:
-bash-3.00$ mysql -u mysql -p
and enter a blank password

This gets me on, however I seem unable to do anything like create database or alter privilege. I wonder if its related to my finding no database called mysql?
-bash-3.00$ mysql -u mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 11 to server version: 4.1.12

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)
Although I understand that show databases will not show things I have no priv to see. Does this mean my settings for the users are all screwed? How do I rectify this situation? Some other (perhaps) useful information.

Code:
[root ~]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

So my BASEDIR seems to be nothing like is suggested in the documentation at [URL].

View 2 Replies View Related

Software :: Convert / Changes MySQL Tables From MyISAM To Ndbcluster?

Dec 21, 2010

Is there somebody knows about how to convert or changes tables on MySQL ?
I was working a lot of months with MySQL with localhost. And now will setting up to MySQL database Cluster. I was success to setup the clustered with "MySQL-Cluster-gpl-7.0.16" on CentOS environment.
But, when I tried to restore database from localhost to clustering system, I get this message error when do changes from MyISAM to NDBCLUSTER Tables "Error, Can't create table 'dbname.sql-3ef9_a8'(errno: 708).

How can I changes the table?

View 7 Replies View Related

General :: Copy Translation Tables From Staging Environment?

Apr 8, 2011

I have 3 translation tables,i.e,camp_generic_trans

camp_generic_trans_def
camp_generic_trans_epc

these tables exist in cntr1/cntr1@camABC1

I have to copy these tables from here to staging environment.

I need to first check if any of the tables exist in staging.If yes,then delete and create new. There are 4 staging env from 5 to 8.

I have to pass the staging environment as parameter to ask the user which environment does he want the tables to be copied.

View 1 Replies View Related

Server :: Data Copy From Mysql To Samba?

Jul 18, 2011

how i can copy data from mysql server to local system or samba server. I want to know the command.

View 5 Replies View Related

Fedora :: MySQL: "plugin" And "server" Tables Corrupt

Feb 6, 2010

In my fresh FC12 install, I installed the MySQL server and it has a database called "mysql" with several tables. A couple of these tables, "plugin" and "server" in particular, appear to be corrupt. Anyone else experience this? Fix?

View 4 Replies View Related

Server :: Mysql "flush Logs" Or "flush Tables With Read Lock?

Jan 15, 2010

policy is to backup mysql with mysql-zrm.However at a certain stage it hangs forever. This is at the "flush logs". I tried this manually and it gave the same result. Even after restarting mysql and the host. After some googling and trying I found out "flush tables with read lock" gives the same result. The tables seem to be MyIsam. I tried with a mysqldump on one server and restore it on a test vm. I used the same config and flush logs still hangs. ALso I tried to change some configuration directives... but with the same result

Edit: btw, I checked the logfile and didn't found anything (/var/log/mysqld.log)

Edit2: I also did myisamchk -s *.MYI (in all direcoties with db files;actually did it with find command) and it did not return anything so datafiles seem ok.

View 4 Replies View Related

Ubuntu Servers :: Su As Backup User Inside Of Bash Script - Lock And Flush Tables On A Mysql Db

Jan 23, 2010

I am attempting to write a backup script that will do the following:

1) lock and flush tables on a mysql db
2) dump the db to a file
3) unlock the tables
4) rsync the file to offsite storage

It all seems to be going well. However, obviously I don't want to setup ssh to the storage server on another network as the root user without a password. so I am attempting to su as the backup user inside of the script but when I try to run the script everything happens as it should until I try to so.. then it jumps out of the script .. akss me to login as the backup user.. proceeds to rsync to the offsite storage it does all this and then resumes execiting the script. it is not going to be setup as a cron job. it will be executed manually. assuming that is the case, how can I get the script to run without prompting for a password?

Here is what I've come up with so far... assuming that the script is run as root and the identity of the backup user will need to be assumed inside the script without perstering the user to enter the backup user's password.

[Code]....

View 8 Replies View Related

Server :: MySQL 5.0.32-Debian_7etch8 "forgets" Permissions Repeatedly

Apr 25, 2011

I'm a PostgreSQL administrator. We have a few sites (maybe 30? 40?) that use MySQL as a backend, but nothing like the thousands of sites that run PostgreSQL. As you can imagine, my knowledge of PostgreSQL has grown much faster than my knowledge of MySQL. The problem, then, is very likely to be PEBKAC. This past weekend we had an upstream transformer incident that managed to take out an enterprise APC, causing this particular server to reboot. The server environment is a bit wanky (I didn't set it up this way), with both PostgreSQL and MySQL running together on a Debian "Etch" box, with PostgreSQL taking up the lion's share of resources (it has 200+ databases vs. MySQL's 10 or so). Both PostgreSQL and MySQL came up after the reboot, but now MySQL is acting "funny".

Initially after the reboot, sites were getting "Could not connect to MySQL." I went in and looked at the user and db tables and fixed the permissions, ran flush permissions, and all sites came up. Happy DBA. Over the remaining weekend and this morning, we're seeing a repeated issue where sites get "Could not connect to MySQL", and it affects sites independently of each other (site "A" is fine, site "B" gets "could not connect to mysql"). I checked the max_connections and max_user_connections and noticed that they were a bit lower than I'd like, so I bumped them up (now set to: 1000 max_connections, 800 max_user_connections) and ran flush permissions again. All is well once more.

Then it happened again. Granted, it's not nearly as frequent as it was Saturday, but it still occurs. This is becoming problematic (and, as you can imagine, quite a headache). I'm the only DBA in my company, so *ANY* ticket that has the word "database" in it, regardless if it's PostgreSQL/MySQL/MSSQL/DB2/Oracle/etc... find their way to me...and this one has me a bit stumped. Every time it occurs, I can run "flush permissions" and everything works again. I've considered the short-term fix of creating a cronjob, but that's quite a hack and I'd rather just fix the cause rather than treat the symptom.

Edit - a bit more background on this particular server: I had it running PostgreSQL 8.3.5, then went on vacation. When I returned, it was running PostgreSQL 8.4beta1 (it's a production box! /me cries) and now PostgreSQL has all kinds of library version mismatch issues and what-not. I scolded the IT tech who gave dev root on this box, revoked all dev permissions, and I've been busy building a replacement machine to move all of the PostgreSQL databases to, but due to some purchasing delays the replacement box isn't ready yet. It's entirely possible that MySQL has similar issues, though I've not witnessed anything of the sort (yet).

View 1 Replies View Related

OpenSUSE Network :: ERROR 2002 (HY000): Can't Connect To Local MySQL Server Through Socket '/var/mysql/mysql.sock

Jun 7, 2011

I think this goes here, but I'm not sure. I decided that XAMPP had been troublesome enough. MySQL never worked. So I decided to instal the LAMP stack offered by YaST. I went about installing it thinking that it would all work. But it seems that I was wrong. So I try to start mysql, and here's what I get:

Code:
the-matrix:~ # mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) or
Code:
the-matrix:~ # rcmysql start
Starting service MySQL warning: /var/mysql/mysql.sock didn't appear within 30 seconds
chmod: cannot access `/var/run/mysql/mysqld.pid': No such file or directory

[Code]...

View 6 Replies View Related

General :: Can't Connect To Local MySQL Server Through Socket '/var/lib/mysql/mysql.sock' (2)

Jun 2, 2010

i am using liferay5.2(mysql included in the download pack) on fedora. while liferay is working fine but i cannot connect to mysql.i am getting the error

[
[root@localhost ~]# ln -s /var/lib/mysql/mysql.sock /tmp
[root@localhost ~]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.

[code]....

i didnt find the mysql.sock file in the location /var/lib/mysql/mysql.sock. i cannot find the portal-ext.properties file also to make intial settings.

View 9 Replies View Related

General :: Copy Permissions From One Directory Recursively To Another?

May 23, 2011

I have a system where the permissions of many files are messed up. I have another system that has the same files, if I put that hard drive in, without simply overwriting the files, is there a way where I can recursively set the permissions of each file to that of this other directory?

View 1 Replies View Related

Security :: Samba Permissions (Can Read But Can't Copy)

Jan 10, 2011

I have a question regarding Samba Permissions. As the subject described, is it possible to let users read the file but can not copy the file physically? It's fine if they open and copy paste the contents but no physical copy paste and also I need to log the activity of the users. If samba will not be able to comply my needs, could you suggest some programs to meet my requirements?

View 3 Replies View Related

Security :: Block Certain Crafted Packets With IP Tables Before Reaching A Server?

Mar 14, 2011

Battlefield 2 server being attacked by packets that creates infinite loop, then when a player disconnects, server crash.

The packets seems to be always the same.....

Attacker Script: [URL]

Script in action:

[Code].....

I need to find a way to block these 4 packets (i think theyre 4 for what i tested) with IP TABLES.

EDIT: There seem to be other different replies, maybe 1 different but no more.... maybe you can find something useful in the script.

View 3 Replies View Related

Server :: Hugepages Experiment - Triggering Large Page Tables

Feb 28, 2011

I am learning about linux memory and hugepages, and know that hugepages basically is just memory that manages memory. I thought I'd experiment with the subject, and wrote a very small C program [URL] that basically just eats 20 GB of memory. The idea was that I would use this small C program to see how big the page table would get when handling large areas of memory when I'm not using hugepages. After running the program on my RHEL 5 server I was expecting the PageTable to be huge, but found that it was only about 43 MB. The page size on my RHEL box i 4 kB. Why I'm not getting the major PageTable size issue I was expecting?

View 2 Replies View Related

OpenSUSE Network :: MySQL Create User/permissions?

Jan 13, 2010

MySQL gets installed with root user by default, root user can administer every mysql database installed in the system. Question is how to create a new user that will not be able to administer all the databases in the system the way as root user is? Can it be done using webmin?

View 7 Replies View Related

General :: Copy Mysql Database

Mar 8, 2010

I want to migrate a mysql databases from a old server to a new server ( Redhat ) , can advise what I need to do ,is it just copy all .frm , .MYI & .MYD files to new server will do ? or I need to do export and inport data ?

View 12 Replies View Related

Ubuntu Installation :: Copy /home Without Losing Permissions?

Nov 16, 2010

I backed up my "/home" and "/usr" folders from a previous installation.How can I copy them on to my new installation without losing my permissions?I tried using nautilus, but everything had "Root-only" permissions after I pasted the files.

View 8 Replies View Related

Ubuntu :: Change Permissions On Files So Can Copy Them Freely

Apr 30, 2011

My laptop has Ubuntu as a dual boot. Many times I want to copy files from one folder to another. But I run into permissions problems.

For example, I downloaded a program that required me to put a rules file in /etc/udev/rules.d But when I tried to do that, I got an error: "permission denied"

Is there any way to change permissions on folders so that I can freely copy them from one folder to another? That would make life a lot easier.

View 2 Replies View Related

Ubuntu :: Change Permissions To Copy Data From Bootable USB?

Jul 17, 2011

I have two HDDs in computer, one with ntfs and windows on it and second with btrfs. I want to get data on that btrfs disk. I boot with bootable USB stick with ubuntu on it but I found out that I cannot copy anzthing. I dont have permissions. How to change that. I am logged in as nobody here in USB stick, and files are probably locked as mz previous username when I create them.

View 1 Replies View Related

Server :: ERROR 1146: Table 'information_schema.tables' Doesn't Exist

Jul 13, 2010

Does anyone know how to write this command for mysql version 4? (The command is for mysql version 5, I guess since when I check database in mysql server version4 there is no database name information_schema ) command:select concat(table_schema,'.',table_name) as table_name,table_rows from information_schema.tables where table_rows > 1000000 order by table_rows desc; meaning:show all database,table name and row count from all databases that has table row more than 1000000

Run result with mysql version 5: mysql> select concat(table_schema,'.',table_name) as table_name,table_rows from information_schema.tables where table_rows > 1000000 order by table_rows desc;

[Code]....

View 3 Replies View Related

Fedora Servers :: Joomla+MySqlD: Mysql Homedir Permissions?

Feb 1, 2009

I've created a mysql user and he can connect Joomla to mysqld when everyone has full permissions to the mysql homedir but I know this is bad from a security standpoint. If I set mysql user as the only one with permissions then I can't connect. I know Joomla support is not very help from past experience, wish I could dump it for something else but it does work great once it is configured so I need to keep it around, can anyone make a guess as to what permissions I need to have set on mysql's home dir so that joomla can still connect yet I am more secure than now?

View 11 Replies View Related

General :: Windows - Change Permissions On /var/www To Copy Files From Other Systems

Jul 16, 2011

I have a NTFS drive mounted at /media/bigbrother as my user. I have no trouble reading or writing to files here. I just created a link to /var/www using: ln -s /var/www /media/bigbrother/

The link is there however, I can't even open the folder. How should I go about getting access. So that I'm able to copy files from other systems on the network.

View 1 Replies View Related

Ubuntu :: Mac - Set Permissions To Copy Files From The Snow Leopard Partition?

Jun 26, 2010

I have a comp with Snow Leopard/Windows/Ubuntu 10.4 on it. What I'm trying to do is set permissions to let me copy files from the Snow Leopard partition. I use to be able to. Now I get Permission denied. What do I need to do to set up permissions to the hfs+ journaled partition?

View 1 Replies View Related

Server :: How To Import Database And Its Tables To Rhel4 Inorder To Working Website Properly

May 31, 2011

I have created a website in php.wamp server is used to run the site.i created the database in phpmyadmin using mysql.These all were done in windowsXP.Now I want to import it into redhat linux system.how can I import database and its tables to rhel4 inorder to working the website properly

View 7 Replies View Related

Ubuntu Servers :: Mysql Error Stopping MySQL Database Server Mysqld?

Jun 17, 2010

I have installed Mysql in Ubuntu 9, for the use of roundcube database.After installing iam getting the error like this

* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.

So because of this in the roundcube configuration its giving the error message that MYSQL is not installed. So Kindly give me a idea how to solve this.

View 1 Replies View Related

Software :: Connecting To Mysql Database - Can't Connect To Local MySQL Server Through Socket

Aug 25, 2010

I'm having problems connecting to the mysql database on my system. I first noticed this when I was trying to set up the program anymeal. I subsequently tried using MySQL Administrator (mysql-admin), but had no luck. It gives my the following feedback:

Code:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Click the 'Ping' button to see if there is a networking problem. I press the ping button, and it seems to connect.

Code:

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved