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.
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 run a wordpress blog with apache2+mysql5+php5 in a Debian vps with 1024mb ram (plus swap).
When you read the website everything works quick and smooth, but when you have to add data to the database (edit posts, write posts, write comments) something weird happens. monitoring the system with the top and I see that, for example, as soon as an article has been posted (already got the "article posted" message in the page) the free ram goes suddenly down (some seconds) from 800mb to 0. Swapping starts and the website stops responding. in the meanwhile cpu "wa" goes high (90%++).
Typing ps aux I can see that is not mysql process's fault, actually it seems more that it's apache to cause this ram hogging, in fact an apache restart brings back tons of free ram.
# Here is entries for some specific programs # The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket= /var/run/mysqld/mysqld.sock nice= 0
[mysqld] # # * Basic Settings # user= mysql pid-file= /var/run/mysqld/mysqld.pid socket= /var/run/mysqld/mysqld.sock port= 3306 basedir= /usr datadir= /var/lib/mysql tmpdir= /tmp language= /usr/share/mysql/english skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address= 127.0.0.1 # # * Fine Tuning #
key_buffer= 64M max_allowed_packet= 16M thread_stack= 128K thread_cache_size= 8 max_connections = 600 table_cache = 256 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 16M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. #log= /var/log/mysql/mysql.log # # Error logging goes to syslog. This is a Debian improvement :) # # Here you can see queries with especially long duration #log_slow_queries= /var/log/mysql/mysql-slow.log #long_query_time = 2 #log-queries-not-using-indexes # # The following can be used as easy to replay backup logs or for replication. #server-id= 1 #log_bin= /var/log/mysql/mysql-bin.log # WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian! #expire_logs_days= 10 #max_binlog_size = 100M #binlog_do_db= include_database_name #binlog_ignore_db= include_database_name # # * BerkeleyDB # # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12. skip-bdb # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # You might want to disable InnoDB to shrink the mysqld process by circa 100MB. skip-innodb # # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem
I have came across site in my statistics that apperantly runs with about 99% of my content flash files. He put adsense all around them, too - sneaky.
I know it is possible to disable hotlinking from other sites using htaccess, but is it possible to disable hotlinking for ONE site? I need to block .swf that come from example.com domain.
Table '231_message' is marked as crashed and should be repaired
I haven't ever had this happen, is all my data truely lost or can i 'repair' it
i was moving sites to a different server (VPS -> dedicated) and on the vps i have a max of 20gb storage, well as i was using the cpanel transfer it filled this up because it didnt have a warning about this (i dont accept blame )
either way it seemed at this time someone on my site tried to make an adjustment to the table and it crashed it since there wasnt room? i really need to get this fixed asap so I can properly move this site with a working database
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?
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..
I optimized a mysql table of 2 million records and about 500MB.. it took about 15 minutes.. However, on the same DB now i have another huge table of 88 million records, it size is 2.2 GB and it has about 30 MB to optimize... my questions..
1.- How can I speed up the optimization process so it can take the less possible time? any tweaks to my.cnf?
2.- Should I repair it using phpmyadmin or just from the shell?
3.- Should I stop http traffic during this optimization?
This is a dedicated db mysql server that handles a large VB forum with 5-8 users online average:
I accidentally deleted the columns_priv table in mysql database. How can I bring it back can anyone show me the structure of that table so I can build it back.
what I can do about the following database error in mysql?
Incorrect key file for table '/tmp/#sql_(number of table.MYI); try to repair it
I've repaired, optimized and checked the database in phpmyadmin. Initially 2 tables were showing overhead, but the error message is for a temp table and I'm not sure how to try to repair a temp table.
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
I've been with my Strato VServer and it installed Plesk on Linux a big problem.
I coming no longer in the Plesk Dashboard and the following code appears:
Syntax error or access violation: 1286 Unknown table engine 'InnoDB'
Here are the contents of my my.cnf
# # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports.
I am using Parallels Plesk Panel v. 11.0.9 on a V-Server provided by Strato (Germany), the OS is Ubuntu 10.04 LTS. Established and running under Plesk is a MySQL-Database, administered via Plesk by PHPMyAdmin 3.5.8.1. PHPMyAdmin offers the following information:
Datenbank-Server
Server: Localhost via UNIX socket Software: MySQL Software-Version: 5.1.41-3ubuntu12.10 - (Ubuntu) Protokoll-Version: 10 Benutzer: admin@localhost Server Zeichensatz: UTF-8 Unicode (utf8) Webserver
sw-cp-server Datenbank-Client Version: libmysql - mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $ PHP-Erweiterung: mysql Click to expand...
I have an account on godaddy, with more than 20 domains registered and well, so far i have been in charge of the updates of these domains and the websites they represent. But now I have this customer who is asking me to have access to his specific domain so he can upload files by him self, the thing is that i dont have a clue of how to do it. I tried to create a new account in godaddy for this customer and tried to transfer this domain into his account and I was not allowed to. I cannot give him my username and psw cause he wont only have access to his website but all those i have registered under my account. I will really appreciate some advises to help me work this out.
I'm using Concrete5 CMS to create a website. This CMS creates/manages all its webpages in a mySQL database. Thus, there is no physical folder associated with each webpage, so I can't simply create an .htaccess file and place it in the directory tree in the right sub-folder to restrict access for that sub-folder and all folders it contains.
I have one .htaccess file located at the root level (e.g top-level folder for the website).
QUESTION 1: I need place in this top-level .htaccess file to (1) restrict access to only two specific IP addresses that I can specify (blocking access to all other IP addresses), and (2) specify the URL addresses that I wish to apply this rule to?
In our quest to stop 'some' of the spamming techniques, I was wondering if there is a way to disable user 'nobody' from sending emails on either a domain or account level - rather than server-wide?
Reason for asking is that I would like to allow 'nobody' emails to just a handfull of trusted clients that have never had problems.
This is the mod_rewrite rule I'm trying to create. I am very new to Apache admin. Here's the issue:
I have 3 vhosts running on my HTTPD Apache 2.2.24 server: Server1, Server2, Server3. Each vhost is connected to a Weblogic application server. We are trying to prevent access to the Example.portal page on each application server.