Wich User Have More Mysql Process?
May 25, 2009How can see wich user have more mysql process?
View 2 RepliesHow can see wich user have more mysql process?
View 2 Replieshow check which database / user MySQL overload the server?
View 2 Replies View RelatedHow can see wich vps used more server resource in openvz/hypervm.
View 3 Replies View RelatedRecently, there are a lot of "apache" processes hogging my Cpanel server with the default owner "nobody". How could I track the apache process back to which user is using it?
View 8 Replies View RelatedI usually use the "top" command to see what is happening in my server ... Normally everything is OK untill one week ago I start so see this process:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1115 root 20 0 10768 10m 164 R 26 0.5 46:17.27 httpd
Is the number 1 on the top list using a lot of CPU and MEM (as I say before ... I never have seen this command in the past)
So when I kill the process everything goes fine but only for a few minutes and then is comming back
There is a too many mysql process (because of directadmin) but i don't want to. As i read it is related with compile options.
Is there a way turn off that setting to one mysql process ? OR how can i told to directadmin that i want to one mysql process ?
mysqq has a nice value of 6, is this fine? I read somewhere that it's better at a value of -5.
View 4 Replies View Relatedon my top process am having this one as shown in the attachement image
its consuming time+ of 746:21:95
on the Process Manager that mysqld process is using the command
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/host.theplanet.host.pid --skip-external-locking
is that process normal? and what is cousing it? should i kill it?
I have a constant mysql process using 10-20% CPU, its very strange because the process is always present, if I restart apache and mysql and I just open the phpmyadmin or any website connecting to the DB I get this error.
With strace I have seen that the process details are:
futex(0x87326c4, 0x5 /* FUTEX_??? */, 1) = 1
futex(0x8732174, FUTEX_WAKE, 1) = 1
select(15, [13 14], NULL, NULL, NULL) = 1 (in [14])
fcntl64(14, F_SETFL, O_RDWR|O_NONBLOCK) = 0
accept(14, {sa_family=AF_FILE, path="ӿ"}, [2]) = 25
fcntl64(14, F_SETFL, O_RDWR) = 0
getsockname(25, {sa_family=AF_FILE, path="/var/run/mysql"}, [30]) = 0
fcntl64(25, F_SETFL, O_RDONLY) = 0
fcntl64(25, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(25, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(25, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
The strace show that this piece of code is being repeated everytime that any website or app is using the database.
I have seen that the process call to the path /var/run/mysql in:
getsockname(15, {sa_family=AF_FILE, path="/var/run/mysql "}, [30]) = 0
...but in my system the path doesnt exists, its /var/run/mysqld/ and I cant find a call to "/var/run/mysql" in any file of the server (i have tryed with sudo grep -nr '/var/run/mysql' /)
Server specs:
CENTOS Enterprise 4.6 i686
Linux 2.6.9-67.0.7.ELsmp
Core2Duo E6750
PHP Version 5.2.5
MySQL 5.0.45
how do I stop mysql process for good?
service mysqld stop & killall mysqld don't do anything, mysqld stop and few minutes latter it restart again.
I run httpd with lxadmin.
When i login to the root for the server and go to mysql process list i see a lot of processes that are connected to photo handling and the sate is Locked with over 500 seconds of each one.
I see there is one process that the state says: Copying to tmp table
I read online that if this is taking long it might lock up other queries causing your server to perform slow and only solution is to restart mysql servers.
Right now i have over 100 queries that say Locked and one that says Copying to tmp table....each time i have to restart the mysql services but this happens every 10 minutes as i have enough traffic to cause this problem.
in one of our dedicated servers, when we go to WHM/Service Status / CPU Memory MySQL usage.. http server and MySQL process appears all 3 times...
is that normal?
i attach an email to be more clear.
I have a single mysql process that never stops and running with 10-200% CPU load: URL....
I restart mysql => process coming back
I restart server => process coming back
I kill process => process coming back
I have run:
# mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` -i 1 processlist
but there was noting that runs >10min.
Code:
> SHOW FULL PROCESSLIST;
+------+-------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+-------+-----------+------+---------+------+-------+-----------------------+
| 328 | admin | localhost | psa | Sleep | 56 | | NULL |
| 8110 | admin | localhost | NULL | Query | 0 | init | SHOW FULL PROCESSLIST |
+------+-------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec)
I have strace the PID
Code:
# timeout 1m strace -f -c -p 5873
Process 5873 attached with 30 threads - interrupt to quit
Process 10499 attached (waiting for parent)
Process 10499 resumed (parent 5873 ready)
Process 10502 attached (waiting for parent)
Process 10502 resumed (parent 5873 ready)
Process 10503 attached (waiting for parent)
[code]....
I found with google a hint for high cpu URL....I have deinstalled "health monitor" module, but that was not the reason.I use plesk 12.0.18 Update #38 with CentOS 6.6 (Final).
download a file to my server with SSH.
i know that the command for a simple download is wget [url]
but i have a link wich needs to enter username and password to download... wich will be the command for that case?
Wich port used by hypervm (master/slave)
I have csf installed on my server and i need to open needed ports.
I`m search for manage dedicated server wich allow torrent trackers scripts.
Can some on tell me wich is best to use?
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 Related31015 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?
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
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.
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?
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
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.
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 View RelatedBy 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 RelatedAnyone 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.
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?
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?
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?
I'd want to create a user and set custom privileges using the standard mysql-client, ie. create user and grant privileges, but I know that sometimes Plesk overwrites my config files for other services.
View 2 Replies View Related