MySQL Anyway To Log Queries Of Specific User

Jun 5, 2007

I know about the general log but want to just log queries of a specific user. Our database does 400 queries/s on a slow day, so I think it would be a pain to grep though a huge log like that. And, im not sure if it would cause any preformance issues.

View 0 Replies


ADVERTISEMENT

Mysql Disable INSERT Access To Specific User/table

Apr 26, 2009

How can I disable INSERT access to specific table.

The user should have full access the the DB except insert to specific table.

The tables_priv allow to set what enable and not what disable.

I'm using mysql v5

View 4 Replies View Related

Upto 150 MySQL Queries A Second

Apr 7, 2008

I'm currently hosting all of my stuff with my own Wild West Reselling Account, i.e., InnoDomains.com.

Problem is I'm running multiple Wordpress Installations and a few websites that have some pretty intense MySQL work going on in the background, and I use about 250GB per month in bandwidth.

My Account gets the 503 downtime errors because according to Customer Service I cannot run more than 50 MySQL queries in one second. Well, that's not much of a challenge because a lengthy wordpress page runs about 90 queries and loads in 2-3 seconds. Time this by three including the other websites and a couple of shopping stores, and I'm easily doing more than 100-150 queries a second more than several times a day, thereby seeing that nasty, irritating error.

My other option is to split up all the websites over basic $ 3.95 per month accounts. I don't want to switch to a dedicated server yet because I'm not really making a whole lot of money (about $ 30 per month). Another thing I could do is move my MySQL testing to a local machine, and that may actually reduce the load on the damn server.

Are there any hosts out there that will allow me to do more than 100 MySQL queries per second? If so, are there any that are any good?

View 13 Replies View Related

Limiting MySQL Queries

Jun 30, 2007

Is there any way to set max MySQL queries per hour to all MySQL users at once?

(lets say 20000 queries for each user?)

(cPanel/SuSE 10.0/MySQL 5.0.X).

View 2 Replies View Related

Mysql Slow Queries

Feb 25, 2007

I added the following to my.cnf and restarted mysql
log_slow_queries=/var/log/mysql/mysql_slow-queries.log

I saw at leat 53 slow queries, however, there is no such file in that folder.

View 9 Replies View Related

[MySQL] Too Many Connections: Locked Queries

Dec 17, 2008

This has happened twice now. I have my wait_timeout variable set to 60 seconds, but occasionally my database gets overloaded with "locked" queries. Here's an example of my processlist:

Code:
| 14773848 | db_name | localhost | db_name | Query | 35483 | statistics | SELECT COUNT... |
| 14776290 | db_name | localhost | db_name | Query | 35144 | statistics | SELECT COUNT... |
| 14778877 | db_name | localhost | db_name | Query | 34841 | statistics | SELECT COUNT... |
| 14790744 | db_name | localhost | db_name | Query | 33056 | Locked | UPDATE... |
| 14791275 | db_name | localhost | db_name | Query | 32977 | Locked | SELECT... |
| 14791395 | db_name | localhost | db_name | Query | 32960 | Locked | SELECT... |
| 14791556 | db_name | localhost | db_name | Query | 32929 | Locked | SELECT... |
| 14791603 | db_name | localhost | db_name | Query | 32924 | Locked | SELECT... |
| 14791757 | db_name | localhost | db_name | Query | 32900 | Locked | SELECT... |
| 14792209 | db_name | localhost | db_name | Query | 32815 | Locked | SELECT... |
| 14792355 | db_name | localhost | db_name | Query | 32786 | Locked | SELECT... |

This continues on with locked queries all the way up to my limit of 450 connections, then the whole server goes down. Note the time spent processing these queries, 35483 seconds and counting! Surely the wait_timeout is supposed to prevent this from happening?!

Also, this appears to start with queries in the State "statistics". Then the State for the following queries becomes "locked". Does anyone know what these mean? Can I get them to timeout normally? Queries which never timeout are guaranteed to bring your server down eventually, surely this is not the desired behaviour.

View 4 Replies View Related

No Clue: Automatic MySQL Queries

Apr 9, 2008

I've been pondering something for a long time here, but never really knew the right question to ask, or how to word it... so I never even know what to search for. So I honestly have no idea what I'm asking or if this is even under the right topic. What I'm looking for is answers, links, tutorials, or just some words I can search for to help me do the following:

I have a MySQL database filled with accounts. People have to pay to get these accounts. All the accounts are set to expire on different days. I need to send an e-mail out to accounts, for example, to let them know they're expiring, say, a month before this will occur. Right now the only way I know to do this is to have MySQL queries on a PHP page that, every time the page is loaded, runs through all the accounts, checks their expirations, and sends emails to those that need it. I know there has to be a way to have this happen automatically without having to load a PHP page every day, for example.

View 2 Replies View Related

Optimizing These Particular MySQL Slow Queries In WordPress

Jun 14, 2008

What I did here was create /var/log/mysqld.slow.log for queries that are taking one second or longer. After around 36 hours, here is what I came up with. Since the file size of /var/log/mysqld.slow.log was 219KB, posting it in its entirety it not practical. Therefore, I used a program, the perl script known as mysql_slow_log_parser found on www.retards.org, to parse the mysqld.slow.log to make it easier to interpret and read. The result was that the original filesize of 219KB was converted to the smaller size of 14KB....

View 7 Replies View Related

MySQL Replication Setup With 150 Queries/sec -> Major Lag

Jun 8, 2008

I have fairly a large web site that has a forum and a torrent tracker.

Currently MySQL server is handling about 150 queries an avarage per second.
Here is the server spec:

Core2Duo 2.66Ghz
4Gb RAM
320GB SATA 7200RPM (Server provider does not have 1.5K RPM nor 1.0k RPM)
100Mbit Connection (servers on the same switch and the switch does not have 1Gbit port)
MySQL Version: 5.0.51a

I had Master-Master Replication setup with forum running on one and the tracker running on the other.
Although this has been working for about few days, we started seeing lags in the replication process.
After a week, there is a major lag and the changes made on one of the servers takes about 5 hours to appear on the another.
So, this doesn't work.

What would be the other ways of splitting MySQL queries concerning the same database?

While I was researching, I read about MySQL Cluster with database storage engine being NDB.

But, let's say that there is a power failure on both the nodes at the same time, then I would lose the whole database as the database is stored on the memory correct?
I would not like to take that chance either, but if this is faster then replication method then maybe I will concider.

I thought about editing the forum coding to make all queries that concerns the tracker to go in to, say server B (with forum's primary MySQL server being Server A), and make the tracker use server B as MySQL backend, but it seemed like a heavy work so that will be the last choice.

View 6 Replies View Related

Limiting Ssh User To Specific Folder

Jun 23, 2009

I may have this wrong, but I think it's possible. I have a friend who wants to run a process on one of my servers, now I don't particularly 'care' about this server, it's just used for a couple of unimportant things so I'm okay with him running it, but I don't want the hassle of sorting out things if he decides to delete everything, so I'm hoping it's possible to limit his directory.

For example, I have the folder "people" in the top most directory, inside that I have "arthur", I want to limit the ssh user "arthur" to the folder "arthur", I don't want him to be able to cd ../../ and delete stuff, is this possible?

View 3 Replies View Related

How Can I Restrict User Specific CPU Usages

Nov 18, 2008

How can i restrict my user that always taking high CPU usages..i have linux server with shared hosting and most of the time i suffer that some user takes 10% of our server CPU so that i want to restrict those take high cpu usages..

View 6 Replies View Related

Apache :: How To Detect Where User Has Come From A Specific Website

Nov 1, 2013

configure Apache server to handle users requests using condition based on where he come from so i can redirect him . what i need if user came with from site start with xn--* redirect him to virtual host and if he came from any other link then go to another virtual host

View 2 Replies View Related

VPS Incredibly Slow, Huge Numbers Of Slow MySQL Queries For Plesk/Watchdog

Nov 11, 2008

I've got 25 domains on a Virtuozzo/Plesk8.6/CentOS5 VPS. Each domain has one up-to-date install of WordPress, most have very little traffic (average 200mb per month), maybe 2 domains get 5-7gb traffic per month.

I monitor port 80 connections and rarely see more than 10 at a time.
That should in my opinion be no problem at all for a VPS with 768mb guaranteed ram and 2.4ghz cpu. I've got 30gb hard drive spare too.

But.... about 8 or 10 times a day it grinds to a complete halt: server load at 500-1000%, sites timing out, plesk takes 3mins to load, often I can't even connect with SSH, and the plesk web server, apache

INSERT INTO module_watchdog_sys_stat (time, type, value, service_id) VALUES(FROM_UNIXTIME(1226404705), 'MAINMEM_USAGE', 17472, 11);

80 seconds sounds like a huge amount of time for a MySQL insert to me! Does anyone know if this is likely to be the cause of my trouble? Some problem with Plesk and the database? Or could it be something else?

View 3 Replies View Related

Recommend A UK LAMP Host - With Some Specific Mysql Privilege Requirements

Dec 13, 2008

I have a moderately successful site, which makes enough money to cover my current hosting costs of 7 per month. I know, millionaire row it ain't, but it's popular. But my database is getting big and my current host wont allow the user of EXECUTE and SUPER privileges which I need to run triggers and stored procedures to keep the page load times sensible.

So, I need another UK host with:

- 2Gb of space (the site serves up big PDF documents)

- 70Gb of bandwidth (I said they were big)

- mysql privs available as above

Customer service with my current host, uk web solutions, is great (apart from refusal to countenance the privileges) so I need my new host to be as good. Budget? well, you can see what I'm paying now, and I have a psychological £10/month barrier which I don't want to cross.

View 2 Replies View Related

Apache :: How To Redirect Specific Useragent On Specific URLs

May 20, 2015

I have question: How to redirect specific useragent on specific URLs to specific URLs in .htaccess [Question]

E.g.:

I want to redirect 301 with conditional:

Code:
useragent: Firefox
from my url1: domain[dot]com/old-url1/
from my url2: domain[dot]com/old-url2/

to

Code:
to new url1: in my url1: domain[dot]com/new-url1/
to new url2: in my url1: domain[dot]com/new-url2/

I create this in my .htaccess but not work

Code:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} googlebot [NC]
RewriteRule ^/?this-is-url/?$ domain[dot]com [L,R,NC]

View 1 Replies View Related

Connect To MySQL DB Only On Certain User

Apr 20, 2009

I am using cPanel 11 (stable release) on a CentOS 5 server and would like to make it so that a certain database can only be connected to from the cPanel user that it is under (ie. user1_db can only be connected to from the user "user1" on the same server).

View 9 Replies View Related

How To Find Which Mysql User Is Using All Cpu

Nov 13, 2008

31015 100 15 0 151m 35m 5156 S 28 0.4 379:34.10 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql

This is my top process, I have quad core server and because of this server load is over 10

I am using cPanel, is it possible to trace which user is using all this cpu?

View 6 Replies View Related

Wich User Have More Mysql Process?

May 25, 2009

How can see wich user have more mysql process?

View 2 Replies View Related

Allow User To Remote Mysql Connection

Aug 15, 2008

how to allow user to remote mysql connection from his localhost ( in linux server with WHM )

my user wants to connect to the mysql from his localhost

View 7 Replies View Related

MySQL Forgetting User Permissions

Jul 5, 2007

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 3 Replies View Related

Mysql/user Is Marked As Crashed

Jan 30, 2007

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 7 Replies View Related

What Are Common MySQL User Permissions

Jun 29, 2007

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 3 Replies View Related

Backup Mysql User Privileges

Aug 26, 2007

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 1 Replies View Related

Default Host For Mysql User

Aug 7, 2007

By default, mysql will create user with host as 'localhost'. Now, if I want the host is '1.2.3.4' by default, how to configure it?

View 3 Replies View Related

Change Mysql User Password Via Shell?

Jun 8, 2005

Anyone know the commands to change a MySQL user's password via ssh?

I found stuff for changing the root password, and tried to adapt it for the user, but it didn't work.

View 12 Replies View Related

MySQL Replication For User On Shared Server

Nov 6, 2008

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 5 Replies View Related

Mysql User Privilege Changed By Cpanel Or What

Jun 26, 2008

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 4 Replies View Related







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